-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution] Security Alert Table Performance Optimizations (#…
…192827) ## Summary There are few performance issues with Security's alert table today which this PR aims to fix. 1. Virtualization was not working in Grid View and Event Rendered View. Constraining the height of `EuiDataGrid` makes virtualization work. 2. It was taking lot of time when switching between Event Rendered View and Grid view. Below we compare some performance metric in both above scenarios. ## Solution - Solution was to enable virtualization but bounding the height of the table. - If number of rows < 10, then height is `auto` else it maxed at `600px` ## Grid View - 100 Rows - Changing Query If you compare times below for rendering of Alert Table Components, we see that improvement is of 2.5-5 times. Number of re-renders are also fewer. ### Before ![grafik](https://github.com/user-attachments/assets/c2e14b24-750b-4c7c-981f-d7fde85cfeff) ### After ![grafik](https://github.com/user-attachments/assets/8eab15e2-4e93-41c3-88fe-bdadb367785d) ## Grid View - 100 Rows - Changing view to Event Rendered View Event Rendered View is where these optimization actually shine. If you observe the rendering times, performance gain is upto 10 times for all renders. Number of re-renders are also reduced. ### Before ![grafik](https://github.com/user-attachments/assets/5cba7d86-6b71-496a-9004-8ce5b3599f4e) ### After ![grafik](https://github.com/user-attachments/assets/db9d07fa-2afe-4f3d-8261-cc16d40165bc) ## Grid View - Change page size from 20 rows to 100 rows Here also we achieve almost 15 times improvement in the render times of the table. ### Before ![grafik](https://github.com/user-attachments/assets/a8a3467a-7774-4d02-ab4c-80433aa99660) ### After ![grafik](https://github.com/user-attachments/assets/1c9a8645-7fbd-49f2-b72b-83d8688decbc) ## Desk Testing Guide Below scenarios need to tested to make sure Alert Table is working fine in both Grid View and Event Rendered View 1. Alert Page - Analyzer is working fine - Session Viewer is working fine - Alert Table when grouping is enabled. 3. Rule Details Page - Analyzer is working fine - Session Viewer is working fine - Alert Table when grouping is enabled. 5. Full Screen. - Analyzer is working fine - Session Viewer is working fine 7. Number of records < 10 - should resize the table to fit the content. 8. Number of records > 10 - should have fixed height and no-virtualization enabled. 9. Change view from Event Rendered View 10. Increase rows from default of `20` to `100`
- Loading branch information
Showing
5 changed files
with
41 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters