[Discover] Improve performance of breakdown field search#229335
[Discover] Improve performance of breakdown field search#229335jughosta merged 7 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
| act(() => { | ||
| button.click(); | ||
| }); |
There was a problem hiding this comment.
can we use userEvent for this actions?
| input.focus(); | ||
| fireEvent.change(input, { target: { value: 'extee' } }); |
There was a problem hiding this comment.
same here, can we use userEvent?
There was a problem hiding this comment.
It did not work with useEvent when I tried (because it thinks for some reason that it can't accept pointer events) so I went with fireEvent here.
| ); | ||
|
|
||
| const filteredOptions = useMemo( | ||
| function filterOptionsForSearchValue() { |
There was a problem hiding this comment.
q: why is this one not an anonymous function?
There was a problem hiding this comment.
Having names for functions allows to see them when profiling.
💚 Build Succeeded
Metrics [docs]Async chunks
History
cc @jughosta |
|
/oblt-deploy |
yngrdyn
left a comment
There was a problem hiding this comment.
Everything is working as expected in Data set quality
Screen.Recording.2025-07-28.at.15.26.43.mov
|
Starting backport for target branches: 8.18, 8.19, 9.0, 9.1 |
) - Closes elastic#221362 ## Summary This PR moves the filtering logic from `EuiSelectable` to Kibana side so we can optimize and debounce it for Breakdown dropdown on Discover page. And looks like this component is also used somewhere in dataset quality details area. Before (ui freeze): <img width="1203" height="423" alt="Screenshot 2025-07-25 at 14 24 55" src="https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5" /> After (debounced calculations): <img width="1196" height="525" alt="Screenshot 2025-07-25 at 14 34 03" src="https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb" /> This fix prevents the "freezing" of the UI during the search. Next possible step would be to evaluate when to enable/disable fuzzy search. ### Checklist - [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 2ef6e95)
) - Closes elastic#221362 ## Summary This PR moves the filtering logic from `EuiSelectable` to Kibana side so we can optimize and debounce it for Breakdown dropdown on Discover page. And looks like this component is also used somewhere in dataset quality details area. Before (ui freeze): <img width="1203" height="423" alt="Screenshot 2025-07-25 at 14 24 55" src="https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5" /> After (debounced calculations): <img width="1196" height="525" alt="Screenshot 2025-07-25 at 14 34 03" src="https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb" /> This fix prevents the "freezing" of the UI during the search. Next possible step would be to evaluate when to enable/disable fuzzy search. ### Checklist - [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 2ef6e95)
) - Closes elastic#221362 ## Summary This PR moves the filtering logic from `EuiSelectable` to Kibana side so we can optimize and debounce it for Breakdown dropdown on Discover page. And looks like this component is also used somewhere in dataset quality details area. Before (ui freeze): <img width="1203" height="423" alt="Screenshot 2025-07-25 at 14 24 55" src="https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5" /> After (debounced calculations): <img width="1196" height="525" alt="Screenshot 2025-07-25 at 14 34 03" src="https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb" /> This fix prevents the "freezing" of the UI during the search. Next possible step would be to evaluate when to enable/disable fuzzy search. ### Checklist - [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 2ef6e95)
) - Closes elastic#221362 ## Summary This PR moves the filtering logic from `EuiSelectable` to Kibana side so we can optimize and debounce it for Breakdown dropdown on Discover page. And looks like this component is also used somewhere in dataset quality details area. Before (ui freeze): <img width="1203" height="423" alt="Screenshot 2025-07-25 at 14 24 55" src="https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5" /> After (debounced calculations): <img width="1196" height="525" alt="Screenshot 2025-07-25 at 14 34 03" src="https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb" /> This fix prevents the "freezing" of the UI during the search. Next possible step would be to evaluate when to enable/disable fuzzy search. ### Checklist - [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 2ef6e95)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…) (#229649) # Backport This will backport the following commits from `main` to `9.1`: - [[Discover] Improve performance of breakdown field search (#229335)](#229335) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T13:29:02Z","message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Discover] Improve performance of breakdown field search","number":229335,"url":"https://github.com/elastic/kibana/pull/229335","mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229335","number":229335,"mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
) (#229645) # Backport This will backport the following commits from `main` to `8.18`: - [[Discover] Improve performance of breakdown field search (#229335)](#229335) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T13:29:02Z","message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Discover] Improve performance of breakdown field search","number":229335,"url":"https://github.com/elastic/kibana/pull/229335","mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229335","number":229335,"mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
) (#229646) # Backport This will backport the following commits from `main` to `8.19`: - [[Discover] Improve performance of breakdown field search (#229335)](#229335) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T13:29:02Z","message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Discover] Improve performance of breakdown field search","number":229335,"url":"https://github.com/elastic/kibana/pull/229335","mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229335","number":229335,"mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
…) (#229647) # Backport This will backport the following commits from `main` to `9.0`: - [[Discover] Improve performance of breakdown field search (#229335)](#229335) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Julia Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T13:29:02Z","message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:DataDiscovery","backport:version","v9.2.0","v9.0.5","v9.1.1","v8.18.5","v8.19.1"],"title":"[Discover] Improve performance of breakdown field search","number":229335,"url":"https://github.com/elastic/kibana/pull/229335","mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229335","number":229335,"mergeCommit":{"message":"[Discover] Improve performance of breakdown field search (#229335)\n\n- Closes https://github.com/elastic/kibana/issues/221362\n\n## Summary\n\nThis PR moves the filtering logic from `EuiSelectable` to Kibana side so\nwe can optimize and debounce it for Breakdown dropdown on Discover page.\nAnd looks like this component is also used somewhere in dataset quality\ndetails area.\n\nBefore (ui freeze):\n<img width=\"1203\" height=\"423\" alt=\"Screenshot 2025-07-25 at 14 24 55\"\nsrc=\"https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5\"\n/>\n\nAfter (debounced calculations):\n<img width=\"1196\" height=\"525\" alt=\"Screenshot 2025-07-25 at 14 34 03\"\nsrc=\"https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb\"\n/>\n\nThis fix prevents the \"freezing\" of the UI during the search. Next\npossible step would be to evaluate when to enable/disable fuzzy search.\n\n\n### Checklist\n\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\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"2ef6e9550536259ff3278c201aebec01f9bd02a0"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
) - Closes elastic#221362 ## Summary This PR moves the filtering logic from `EuiSelectable` to Kibana side so we can optimize and debounce it for Breakdown dropdown on Discover page. And looks like this component is also used somewhere in dataset quality details area. Before (ui freeze): <img width="1203" height="423" alt="Screenshot 2025-07-25 at 14 24 55" src="https://github.com/user-attachments/assets/682d923d-3996-4bb2-9e3b-d3daa27197f5" /> After (debounced calculations): <img width="1196" height="525" alt="Screenshot 2025-07-25 at 14 34 03" src="https://github.com/user-attachments/assets/70987d23-934c-4aa7-90a5-e69759e10beb" /> This fix prevents the "freezing" of the UI during the search. Next possible step would be to evaluate when to enable/disable fuzzy search. ### Checklist - [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
Summary
This PR moves the filtering logic from
EuiSelectableto Kibana side so we can optimize and debounce it for Breakdown dropdown on Discover page. And looks like this component is also used somewhere in dataset quality details area.Before (ui freeze):

After (debounced calculations):

This fix prevents the "freezing" of the UI during the search. Next possible step would be to evaluate when to enable/disable fuzzy search.
Checklist
release_note:*label is applied per the guidelinesbackport:*labels.