Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Performance][Security Solution][1/4] - Field Browser Performance #212469

Merged

Conversation

michaelolo24
Copy link
Contributor

@michaelolo24 michaelolo24 commented Feb 26, 2025

Summary

Part 1 of #212173

Testing

For setup see testing section here: #212173 (comment)

Areas to test:

  • Alert Table (Alerts, Rule Detail, Rule Preview pages)
  • Security solution field browser component
  • Flyout table tab.

Background

When investigating the performance of the security solution application, one of the issues that was observed was locking of the page and field browser component when the total number of fields returned were significantly high.

This led to cell values not rendering in the alert table, and the field browser in all the security solution pages causing the page to crash. The relevant images can be seen at the bottom of this description

In short: The push(...fields) is non-performant at scale, and at a significant enough scale (Testing was done with 500k mapped fields), fails to run due to excessive arguments provided to the push method. In this PR improvements are made in the browserFields transformations that are done for the field browser component, expandable flyout table tab, and alert/rule tables via CellValue component.

This work was done to get immediate improvements in the security solution UI, but a longer term consideration will be whether or not the browserFields is even necessary anymore as a concept based on what is available via the fields api. We will revisit once our Sourcerer refactoring work is done.

Screenshot 2025-02-26 at 10 15 29 AM Screenshot 2025-02-26 at 10 18 36 AM Screenshot 2025-02-26 at 10 19 48 AM

image

image

After the fix

(Done on this branch that has the other changes as well)

Screen.Recording.2025-02-26.at.10.41.17.AM.mov

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

@michaelolo24 michaelolo24 added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Investigations Security Solution Investigations Team backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development v9.1.0 v8.17.3 labels Feb 26, 2025
@michaelolo24 michaelolo24 force-pushed the security-performance-field-browser branch from a34a4e7 to 8b03ec7 Compare February 26, 2025 06:53

describe('source/index.tsx', () => {
describe('useDataView hook', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved this to it's own file

* 2.0.
*/

import type { IndexFieldSearch } from './use_data_view';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a file move, no actual code changes

@michaelolo24 michaelolo24 force-pushed the security-performance-field-browser branch from 8b03ec7 to 529193e Compare February 26, 2025 06:59
@michaelolo24 michaelolo24 added backport:all-open Backport to all branches that could still receive a release and removed backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development labels Feb 26, 2025
categoryIds.reduce<BrowserFieldItem[]>((fieldItemsAcc, categoryId) => {
const getFieldItems = () => {
let fieldItemsAcc: BrowserFieldItem[] = [];
for (let i = 0; i < categoryIds.length; i += 1) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for loop for better performance at scale

@michaelolo24 michaelolo24 marked this pull request as ready for review February 26, 2025 15:47
@michaelolo24 michaelolo24 requested review from a team as code owners February 26, 2025 15:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting-investigations (Team:Threat Hunting:Investigations)

@michaelolo24 michaelolo24 force-pushed the security-performance-field-browser branch from 529193e to 0a6dbd3 Compare February 26, 2025 17:09
@michaelolo24
Copy link
Contributor Author

/ci

1 similar comment
@michaelolo24
Copy link
Contributor Author

/ci

@michaelolo24 michaelolo24 force-pushed the security-performance-field-browser branch from 4bf3153 to 7a3e5ad Compare February 26, 2025 20:52
@michaelolo24
Copy link
Contributor Author

The test failures seem to be related to: #170365

Comment on lines 76 to 87
const categoryFieldItems = categoryBrowserFields.map(({ name = '', ...field }) => {
return {
name,
type: field.type,
description: getDescription(name, EcsFlat as Record<string, EcsMetadata>),
example: field.example?.toString(),
category: getCategory(name),
selected: selectedFieldIds.has(name),
isRuntime: !!field.runtimeField,
};
});
fieldItemsAcc = fieldItemsAcc.concat(categoryFieldItems);
Copy link
Contributor

@logeekal logeekal Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const categoryFieldItems = categoryBrowserFields.map(({ name = '', ...field }) => {
return {
name,
type: field.type,
description: getDescription(name, EcsFlat as Record<string, EcsMetadata>),
example: field.example?.toString(),
category: getCategory(name),
selected: selectedFieldIds.has(name),
isRuntime: !!field.runtimeField,
};
});
fieldItemsAcc = fieldItemsAcc.concat(categoryFieldItems);
let fieldSeen = {} // this can go on line 71
for (let j = 0; j < categoryBrowserFields.length; j += 1) {
const field = categoryBrowserFields[j];
const name = field.name || '';
if(name in fieldSeen) continue;
fieldSeen[name] = true
const categoryFieldItem = {
name,
type: field.type,
description: getDescription(name, EcsFlat as Record<string, EcsMetadata>),
example: field.example?.toString(),
category: getCategory(name),
selected: selectedFieldIds.has(name),
isRuntime: !!field.runtimeField,
};
fieldItemsAcc.push(categoryFieldItem);
}

What do you think about above suggestion. With this we can get rid of uniqBy and concat which needs another iteration. It includes mainly 2 changes

  • Replace uniqBy with simple key existence check in an object.
  • change map to for loop.

Copy link
Contributor Author

@michaelolo24 michaelolo24 Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. 👏🏾 Will make the change. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, with some very minor tweaks!

@michaelolo24 michaelolo24 force-pushed the security-performance-field-browser branch from b82e504 to 2573942 Compare February 27, 2025 16:58
Copy link
Contributor

@logeekal logeekal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🚀

@michaelolo24 michaelolo24 force-pushed the security-performance-field-browser branch from d8b68ad to 81f2b4c Compare February 27, 2025 20:00
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.17, 8.18, 9.0

https://github.com/elastic/kibana/actions/runs/13644121804

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.17 Backport failed because of merge conflicts
8.18 Backport failed because of merge conflicts
9.0 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 212469

Questions ?

Please refer to the Backport tool documentation

michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Mar 4, 2025
…astic#212469)

## Summary
Part 1 of elastic#212173

### Testing
For setup see testing section here:
elastic#212173 (comment)

**Areas to test:**
- Alert Table (Alerts, Rule Detail, Rule Preview pages)
- Security solution field browser component
- Flyout table tab.

### Background

When investigating the performance of the security solution application,
one of the issues that was observed was locking of the page and field
browser component when the total number of fields returned were
significantly high.

This led to cell values not rendering in the alert table, and the field
browser in all the security solution pages causing the page to crash.
The relevant images can be seen at the bottom of this description

In short: The `push(...fields)` is non-performant at scale, and at a
significant enough scale (Testing was done with 500k mapped fields),
fails to run due to excessive arguments provided to the `push` method.
In this PR improvements are made in the `browserFields` transformations
that are done for the field browser component, expandable flyout table
tab, and alert/rule tables via `CellValue` component.

This work was done to get immediate improvements in the security
solution UI, but a longer term consideration will be whether or not the
`browserFields` is even necessary anymore as a concept based on what is
available via the `fields` api. We will revisit once our Sourcerer
refactoring work is done.

<img width="1728" alt="Screenshot 2025-02-26 at 10 15 29 AM"
src="https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020"
/>

<img width="1445" alt="Screenshot 2025-02-26 at 10 18 36 AM"
src="https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6"
/>

<img width="1469" alt="Screenshot 2025-02-26 at 10 19 48 AM"
src="https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765"
/>

![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)

![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)

### After the fix
(Done on [this branch](elastic#212173)
that has the other changes as well)

https://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 750e156)
michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Mar 4, 2025
…astic#212469)

## Summary
Part 1 of elastic#212173

### Testing
For setup see testing section here:
elastic#212173 (comment)

**Areas to test:**
- Alert Table (Alerts, Rule Detail, Rule Preview pages)
- Security solution field browser component
- Flyout table tab.

### Background

When investigating the performance of the security solution application,
one of the issues that was observed was locking of the page and field
browser component when the total number of fields returned were
significantly high.

This led to cell values not rendering in the alert table, and the field
browser in all the security solution pages causing the page to crash.
The relevant images can be seen at the bottom of this description

In short: The `push(...fields)` is non-performant at scale, and at a
significant enough scale (Testing was done with 500k mapped fields),
fails to run due to excessive arguments provided to the `push` method.
In this PR improvements are made in the `browserFields` transformations
that are done for the field browser component, expandable flyout table
tab, and alert/rule tables via `CellValue` component.

This work was done to get immediate improvements in the security
solution UI, but a longer term consideration will be whether or not the
`browserFields` is even necessary anymore as a concept based on what is
available via the `fields` api. We will revisit once our Sourcerer
refactoring work is done.

<img width="1728" alt="Screenshot 2025-02-26 at 10 15 29 AM"
src="https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020"
/>

<img width="1445" alt="Screenshot 2025-02-26 at 10 18 36 AM"
src="https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6"
/>

<img width="1469" alt="Screenshot 2025-02-26 at 10 19 48 AM"
src="https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765"
/>

![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)

![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)

### After the fix
(Done on [this branch](elastic#212173)
that has the other changes as well)

https://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 750e156)

# Conflicts:
#	x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/field_browser/components/field_items/field_items.tsx
michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Mar 4, 2025
…astic#212469)

## Summary
Part 1 of elastic#212173

### Testing
For setup see testing section here:
elastic#212173 (comment)

**Areas to test:**
- Alert Table (Alerts, Rule Detail, Rule Preview pages)
- Security solution field browser component
- Flyout table tab.

### Background

When investigating the performance of the security solution application,
one of the issues that was observed was locking of the page and field
browser component when the total number of fields returned were
significantly high.

This led to cell values not rendering in the alert table, and the field
browser in all the security solution pages causing the page to crash.
The relevant images can be seen at the bottom of this description

In short: The `push(...fields)` is non-performant at scale, and at a
significant enough scale (Testing was done with 500k mapped fields),
fails to run due to excessive arguments provided to the `push` method.
In this PR improvements are made in the `browserFields` transformations
that are done for the field browser component, expandable flyout table
tab, and alert/rule tables via `CellValue` component.

This work was done to get immediate improvements in the security
solution UI, but a longer term consideration will be whether or not the
`browserFields` is even necessary anymore as a concept based on what is
available via the `fields` api. We will revisit once our Sourcerer
refactoring work is done.

<img width="1728" alt="Screenshot 2025-02-26 at 10 15 29 AM"
src="https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020"
/>

<img width="1445" alt="Screenshot 2025-02-26 at 10 18 36 AM"
src="https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6"
/>

<img width="1469" alt="Screenshot 2025-02-26 at 10 19 48 AM"
src="https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765"
/>

![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)

![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)

### After the fix
(Done on [this branch](elastic#212173)
that has the other changes as well)

https://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 750e156)

# Conflicts:
#	x-pack/platform/plugins/shared/triggers_actions_ui/public/application/sections/field_browser/components/field_items/field_items.tsx
michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Mar 4, 2025
…astic#212469)

## Summary
Part 1 of elastic#212173

### Testing
For setup see testing section here:
elastic#212173 (comment)

**Areas to test:**
- Alert Table (Alerts, Rule Detail, Rule Preview pages)
- Security solution field browser component
- Flyout table tab.

### Background

When investigating the performance of the security solution application,
one of the issues that was observed was locking of the page and field
browser component when the total number of fields returned were
significantly high.

This led to cell values not rendering in the alert table, and the field
browser in all the security solution pages causing the page to crash.
The relevant images can be seen at the bottom of this description

In short: The `push(...fields)` is non-performant at scale, and at a
significant enough scale (Testing was done with 500k mapped fields),
fails to run due to excessive arguments provided to the `push` method.
In this PR improvements are made in the `browserFields` transformations
that are done for the field browser component, expandable flyout table
tab, and alert/rule tables via `CellValue` component.

This work was done to get immediate improvements in the security
solution UI, but a longer term consideration will be whether or not the
`browserFields` is even necessary anymore as a concept based on what is
available via the `fields` api. We will revisit once our Sourcerer
refactoring work is done.

<img width="1728" alt="Screenshot 2025-02-26 at 10 15 29 AM"
src="https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020"
/>

<img width="1445" alt="Screenshot 2025-02-26 at 10 18 36 AM"
src="https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6"
/>

<img width="1469" alt="Screenshot 2025-02-26 at 10 19 48 AM"
src="https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765"
/>

![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)

![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)

### After the fix
(Done on [this branch](elastic#212173)
that has the other changes as well)

https://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 750e156)

# Conflicts:
#	x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx
#	x-pack/plugins/security_solution/public/common/containers/source/use_data_view.test.tsx
#	x-pack/plugins/triggers_actions_ui/public/application/sections/field_browser/components/field_items/field_items.tsx
@michaelolo24
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0
8.x
8.18
8.17

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@michaelolo24
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Mar 4, 2025
…astic#212469)

## Summary
Part 1 of elastic#212173

### Testing
For setup see testing section here:
elastic#212173 (comment)

**Areas to test:**
- Alert Table (Alerts, Rule Detail, Rule Preview pages)
- Security solution field browser component
- Flyout table tab.

### Background

When investigating the performance of the security solution application,
one of the issues that was observed was locking of the page and field
browser component when the total number of fields returned were
significantly high.

This led to cell values not rendering in the alert table, and the field
browser in all the security solution pages causing the page to crash.
The relevant images can be seen at the bottom of this description

In short: The `push(...fields)` is non-performant at scale, and at a
significant enough scale (Testing was done with 500k mapped fields),
fails to run due to excessive arguments provided to the `push` method.
In this PR improvements are made in the `browserFields` transformations
that are done for the field browser component, expandable flyout table
tab, and alert/rule tables via `CellValue` component.

This work was done to get immediate improvements in the security
solution UI, but a longer term consideration will be whether or not the
`browserFields` is even necessary anymore as a concept based on what is
available via the `fields` api. We will revisit once our Sourcerer
refactoring work is done.

<img width="1728" alt="Screenshot 2025-02-26 at 10 15 29 AM"
src="https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020"
/>

<img width="1445" alt="Screenshot 2025-02-26 at 10 18 36 AM"
src="https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6"
/>

<img width="1469" alt="Screenshot 2025-02-26 at 10 19 48 AM"
src="https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765"
/>

![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)

![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)

### After the fix
(Done on [this branch](elastic#212173)
that has the other changes as well)

https://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 750e156)

# Conflicts:
#	x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx
#	x-pack/plugins/security_solution/public/common/containers/source/use_data_view.test.tsx
#	x-pack/plugins/triggers_actions_ui/public/application/sections/field_browser/components/field_items/field_items.tsx
michaelolo24 added a commit to michaelolo24/kibana that referenced this pull request Mar 4, 2025
…astic#212469)

## Summary
Part 1 of elastic#212173

### Testing
For setup see testing section here:
elastic#212173 (comment)

**Areas to test:**
- Alert Table (Alerts, Rule Detail, Rule Preview pages)
- Security solution field browser component
- Flyout table tab.

### Background

When investigating the performance of the security solution application,
one of the issues that was observed was locking of the page and field
browser component when the total number of fields returned were
significantly high.

This led to cell values not rendering in the alert table, and the field
browser in all the security solution pages causing the page to crash.
The relevant images can be seen at the bottom of this description

In short: The `push(...fields)` is non-performant at scale, and at a
significant enough scale (Testing was done with 500k mapped fields),
fails to run due to excessive arguments provided to the `push` method.
In this PR improvements are made in the `browserFields` transformations
that are done for the field browser component, expandable flyout table
tab, and alert/rule tables via `CellValue` component.

This work was done to get immediate improvements in the security
solution UI, but a longer term consideration will be whether or not the
`browserFields` is even necessary anymore as a concept based on what is
available via the `fields` api. We will revisit once our Sourcerer
refactoring work is done.

<img width="1728" alt="Screenshot 2025-02-26 at 10 15 29 AM"
src="https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020"
/>

<img width="1445" alt="Screenshot 2025-02-26 at 10 18 36 AM"
src="https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6"
/>

<img width="1469" alt="Screenshot 2025-02-26 at 10 19 48 AM"
src="https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765"
/>

![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)

![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)

### After the fix
(Done on [this branch](elastic#212173)
that has the other changes as well)

https://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 750e156)

# Conflicts:
#	x-pack/plugins/security_solution/public/common/containers/source/index.test.tsx
#	x-pack/plugins/security_solution/public/common/containers/source/use_data_view.test.tsx
#	x-pack/plugins/triggers_actions_ui/public/application/sections/field_browser/components/field_items/field_items.tsx
@michaelolo24
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.16

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

michaelolo24 added a commit that referenced this pull request Mar 4, 2025
…ce (#212469) (#213021)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Performance][Security Solution][1/4] - Field Browser Performance
(#212469)](#212469)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T01:22:25Z","message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","backport:version","v8.18.0","v9.1.0","v8.17.3"],"title":"[Performance][Security
Solution][1/4] - Field Browser
Performance","number":212469,"url":"https://github.com/elastic/kibana/pull/212469","mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212469","number":212469,"mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
michaelolo24 added a commit that referenced this pull request Mar 4, 2025
…nce (#212469) (#213130)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Performance][Security Solution][1/4] - Field Browser Performance
(#212469)](#212469)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T01:22:25Z","message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","backport:version","v8.18.0","v9.1.0","v8.19.0","v8.17.3"],"title":"[Performance][Security
Solution][1/4] - Field Browser
Performance","number":212469,"url":"https://github.com/elastic/kibana/pull/212469","mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/213021","number":213021,"state":"OPEN"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/213023","number":213023,"state":"OPEN"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212469","number":212469,"mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/213022","number":213022,"state":"OPEN"},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/213025","number":213025,"state":"OPEN"}]}]
BACKPORT-->
michaelolo24 added a commit that referenced this pull request Mar 4, 2025
…nce (#212469) (#213025)

# Backport

This will backport the following commits from `main` to `8.17`:
- [[Performance][Security Solution][1/4] - Field Browser Performance
(#212469)](#212469)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T01:22:25Z","message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","backport:version","v8.18.0","v9.1.0","v8.17.3"],"title":"[Performance][Security
Solution][1/4] - Field Browser
Performance","number":212469,"url":"https://github.com/elastic/kibana/pull/212469","mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212469","number":212469,"mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
michaelolo24 added a commit that referenced this pull request Mar 4, 2025
…ce (#212469) (#213022)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Performance][Security Solution][1/4] - Field Browser Performance
(#212469)](#212469)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T01:22:25Z","message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","backport:version","v8.18.0","v9.1.0","v8.17.3"],"title":"[Performance][Security
Solution][1/4] - Field Browser
Performance","number":212469,"url":"https://github.com/elastic/kibana/pull/212469","mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212469","number":212469,"mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
michaelolo24 added a commit that referenced this pull request Mar 4, 2025
…nce (#212469) (#213023)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Performance][Security Solution][1/4] - Field Browser Performance
(#212469)](#212469)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T01:22:25Z","message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat
Hunting:Investigations","backport:version","v8.18.0","v9.1.0","v8.17.3"],"title":"[Performance][Security
Solution][1/4] - Field Browser
Performance","number":212469,"url":"https://github.com/elastic/kibana/pull/212469","mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212469","number":212469,"mergeCommit":{"message":"[Performance][Security
Solution][1/4] - Field Browser Performance (#212469)\n\n## Summary\nPart
1 of https://github.com/elastic/kibana/pull/212173\n\n### Testing\nFor
setup see testing section
here:\nhttps://github.com//pull/212173#issue-2870522020\n\n**Areas
to test:**\n- Alert Table (Alerts, Rule Detail, Rule Preview pages)\n-
Security solution field browser component\n- Flyout table tab.\n\n###
Background\n\nWhen investigating the performance of the security
solution application,\none of the issues that was observed was locking
of the page and field\nbrowser component when the total number of fields
returned were\nsignificantly high.\n\nThis led to cell values not
rendering in the alert table, and the field\nbrowser in all the security
solution pages causing the page to crash.\nThe relevant images can be
seen at the bottom of this description\n\nIn short: The
`push(...fields)` is non-performant at scale, and at a\nsignificant
enough scale (Testing was done with 500k mapped fields),\nfails to run
due to excessive arguments provided to the `push` method.\nIn this PR
improvements are made in the `browserFields` transformations\nthat are
done for the field browser component, expandable flyout table\ntab, and
alert/rule tables via `CellValue` component.\n\nThis work was done to
get immediate improvements in the security\nsolution UI, but a longer
term consideration will be whether or not the\n`browserFields` is even
necessary anymore as a concept based on what is\navailable via the
`fields` api. We will revisit once our Sourcerer\nrefactoring work is
done.\n\n<img width=\"1728\" alt=\"Screenshot 2025-02-26 at 10 15
29 AM\"\nsrc=\"https://github.com/user-attachments/assets/a25f577f-f758-415e-9c93-5452eadb8020\"\n/>\n\n<img
width=\"1445\" alt=\"Screenshot 2025-02-26 at 10 18
36 AM\"\nsrc=\"https://github.com/user-attachments/assets/d70970d3-991a-47ba-b617-5862d18101b6\"\n/>\n\n<img
width=\"1469\" alt=\"Screenshot 2025-02-26 at 10 19
48 AM\"\nsrc=\"https://github.com/user-attachments/assets/1767aa9b-66ab-46be-bc1a-5311630c2765\"\n/>\n\n\n![image](https://github.com/user-attachments/assets/5d746b21-fa9b-425b-826a-cc7abd444f21)\n\n\n![image](https://github.com/user-attachments/assets/4dff2378-d61b-4770-b46b-41cb37d6ead4)\n\n\n###
After the fix\n(Done on [this
branch](https://github.com/elastic/kibana/pull/212173)\nthat has the
other changes as
well)\n\n\nhttps://github.com/user-attachments/assets/da992296-4eb8-49d4-96ca-b0a19a00f1f0\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"750e156c26078015025551c4f10d299ba269fa35"}},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
@mistic
Copy link
Member

mistic commented Mar 4, 2025

This PR didn't make it into the latest BC of both v8.16.5 and v8.17.3. Updating the labels accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Threat Hunting:Investigations Security Solution Investigations Team Team:Threat Hunting Security Solution Threat Hunting Team v8.16.6 v8.17.4 v8.18.0 v8.19.0 v9.0.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants