Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.9] [Security Selection][Detection engine] fixes rule preview perfo…
…rmance issues (elastic#164207) (elastic#164487) # Backport This will backport the following commits from `main` to `8.9`: - [[Security Selection][Detection engine] fixes rule preview performance issues (elastic#164207)](elastic#164207) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vitalii Dmyterko","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-08-22T17:05:15Z","message":"[Security Selection][Detection engine] fixes rule preview performance issues (elastic#164207)\n\n## Summary\r\n\r\nOn every single keyboard type on query input, the whole preview part was\r\nre-rendering. If there are too many alerts, it could take ~150ms-200ms,\r\nfor its re-render. Ultimately, making form almost unusable\r\nSo, in this PR I'm adding memoization for 2 Preview components, to\r\nresolve this issue\r\n\r\n\r\n### Before\r\n\r\n<img width=\"2529\" alt=\"Screenshot 2023-08-17 at 17 13 07\"\r\nsrc=\"https://github.com/elastic/kibana/assets/92328789/c0b137e6-828b-4068-b061-85a5b5ca99f1\">\r\n\r\n### After\r\n\r\n<img width=\"2523\" alt=\"Screenshot 2023-08-17 at 17 07 56\"\r\nsrc=\"https://github.com/elastic/kibana/assets/92328789/06a0983c-d8e0-40c1-9b48-fd4bc106e922\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"cd8a94ba3203022a7791e85a8dd8a6c16ae381ab","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","backport:prev-minor","Team:Detection Engine","v8.10.0","v8.11.0","v8.9.2"],"number":164207,"url":"https://github.com/elastic/kibana/pull/164207","mergeCommit":{"message":"[Security Selection][Detection engine] fixes rule preview performance issues (elastic#164207)\n\n## Summary\r\n\r\nOn every single keyboard type on query input, the whole preview part was\r\nre-rendering. If there are too many alerts, it could take ~150ms-200ms,\r\nfor its re-render. Ultimately, making form almost unusable\r\nSo, in this PR I'm adding memoization for 2 Preview components, to\r\nresolve this issue\r\n\r\n\r\n### Before\r\n\r\n<img width=\"2529\" alt=\"Screenshot 2023-08-17 at 17 13 07\"\r\nsrc=\"https://github.com/elastic/kibana/assets/92328789/c0b137e6-828b-4068-b061-85a5b5ca99f1\">\r\n\r\n### After\r\n\r\n<img width=\"2523\" alt=\"Screenshot 2023-08-17 at 17 07 56\"\r\nsrc=\"https://github.com/elastic/kibana/assets/92328789/06a0983c-d8e0-40c1-9b48-fd4bc106e922\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"cd8a94ba3203022a7791e85a8dd8a6c16ae381ab"}},"sourceBranch":"main","suggestedTargetBranches":["8.10","8.9"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164207","number":164207,"mergeCommit":{"message":"[Security Selection][Detection engine] fixes rule preview performance issues (elastic#164207)\n\n## Summary\r\n\r\nOn every single keyboard type on query input, the whole preview part was\r\nre-rendering. If there are too many alerts, it could take ~150ms-200ms,\r\nfor its re-render. Ultimately, making form almost unusable\r\nSo, in this PR I'm adding memoization for 2 Preview components, to\r\nresolve this issue\r\n\r\n\r\n### Before\r\n\r\n<img width=\"2529\" alt=\"Screenshot 2023-08-17 at 17 13 07\"\r\nsrc=\"https://github.com/elastic/kibana/assets/92328789/c0b137e6-828b-4068-b061-85a5b5ca99f1\">\r\n\r\n### After\r\n\r\n<img width=\"2523\" alt=\"Screenshot 2023-08-17 at 17 07 56\"\r\nsrc=\"https://github.com/elastic/kibana/assets/92328789/06a0983c-d8e0-40c1-9b48-fd4bc106e922\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"cd8a94ba3203022a7791e85a8dd8a6c16ae381ab"}},{"branch":"8.9","label":"v8.9.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Vitalii Dmyterko <[email protected]>
- Loading branch information