-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solutions][Lists] Trims down list plugin size by breaking out the exception builder into chunks by using react lazy loading #99989
Conversation
…nk using lazy loading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳 Should the limits file also be updated to bump it down?
I think so. Not with this PR, if that is ok as that triggers an operations person to take a look. We can do it as a separate standalone PR if you're fine with that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I pulled down and tested the builder functionality. I actually think it's smoother than the current UX for it. Confirmed what you showed me over zoom, with the lists plugin not being pulled in on initial render, just when the modal is opened.
Only question would be about updating the limits file to reflect the now smaller build size. Just saw your comment. Sounds good to do it in a separate PR.
Thanks for going through it on zoom. This was really awesome to see what difference a few changes made.
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…ut the exception builder into chunks by using react lazy loading (elastic#99989) ## Summary Trims down the list plugin size by breaking out the exception builder into a dedicated chunk by using React Suspense and React lazy loading. Before this PR the page load bundle size was `260503`, after the page load bundle size will be `194132`: You can calculate this through: ```ts node ./scripts/build_kibana_platform_plugins --dist --focus lists cat ./x-pack/plugins/lists/target/public/metrics.json ``` Before ```json [ { "group": "@kbn/optimizer bundle module count", "id": "lists", "value": 227 }, { "group": "page load bundle size", "id": "lists", "value": 260503, <--- Very large load bundle size "limit": 280504, "limitConfigPath": "packages/kbn-optimizer/limits.yml" }, { "group": "async chunks size", "id": "lists", "value": 0 }, { "group": "async chunk count", "id": "lists", "value": 0 }, { "group": "miscellaneous assets size", "id": "lists", "value": 0 } ] ``` After: ```json [ { "group": "@kbn/optimizer bundle module count", "id": "lists", "value": 227 }, { "group": "page load bundle size", "id": "lists", "value": 194132, <--- Not as large bundle size "limit": 280504, "limitConfigPath": "packages/kbn-optimizer/limits.yml" }, { "group": "async chunks size", "id": "lists", "value": 70000 }, { "group": "async chunk count", "id": "lists", "value": 1 }, { "group": "miscellaneous assets size", "id": "lists", "value": 0 } ] ``` ### Checklist Delete any items that are not applicable to this PR. - [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
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…ut the exception builder into chunks by using react lazy loading (#99989) (#100073) ## Summary Trims down the list plugin size by breaking out the exception builder into a dedicated chunk by using React Suspense and React lazy loading. Before this PR the page load bundle size was `260503`, after the page load bundle size will be `194132`: You can calculate this through: ```ts node ./scripts/build_kibana_platform_plugins --dist --focus lists cat ./x-pack/plugins/lists/target/public/metrics.json ``` Before ```json [ { "group": "@kbn/optimizer bundle module count", "id": "lists", "value": 227 }, { "group": "page load bundle size", "id": "lists", "value": 260503, <--- Very large load bundle size "limit": 280504, "limitConfigPath": "packages/kbn-optimizer/limits.yml" }, { "group": "async chunks size", "id": "lists", "value": 0 }, { "group": "async chunk count", "id": "lists", "value": 0 }, { "group": "miscellaneous assets size", "id": "lists", "value": 0 } ] ``` After: ```json [ { "group": "@kbn/optimizer bundle module count", "id": "lists", "value": 227 }, { "group": "page load bundle size", "id": "lists", "value": 194132, <--- Not as large bundle size "limit": 280504, "limitConfigPath": "packages/kbn-optimizer/limits.yml" }, { "group": "async chunks size", "id": "lists", "value": 70000 }, { "group": "async chunk count", "id": "lists", "value": 1 }, { "group": "miscellaneous assets size", "id": "lists", "value": 0 } ] ``` ### Checklist Delete any items that are not applicable to this PR. - [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 Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
* master: (27 commits) Disable contextMenu when event is not event.kind=event (elastic#100027) Updates the monorepo-packages list (elastic#100096) Removes circular deps for lists in tooling and bumps down byte limit for lists (elastic#100082) [Security Solutions] Breaks down the io-ts packages to decrease plugin size (elastic#100058) fix-typo: Use of `than` instead of `then` (elastic#100030) [Fleet] Fix error when searching for keys whose names have spaces (elastic#100056) [Workplace Search] Fix bug when transitioning to personal dashboard (elastic#100061) [index pattern field editor] Update runtime field painless docs url (elastic#100014) [QA] Switch tests to use importExport - visualize (elastic#98063) [Canvas] Remove unused legacy autocomplete component (elastic#99215) Re-enable formerly flaky shareable test (elastic#98826) [Uptime] [Synthetics Integration] ensure that proxy url is not overwritten (elastic#99944) [Security Solutions][Lists] Trims down list plugin size by breaking out the exception builder into chunks by using react lazy loading (elastic#99989) [Uptime] Increase debounce and add immediate submit to `useQueryBar` (elastic#99675) chore(NA): moving @kbn/docs-utils into bazel (elastic#100051) [Enterprise Search] Fix SchemaFieldTypeSelect axe issues (elastic#100035) Remove outdated comment about schema validation not working (it does work now). (elastic#100055) Rename alert status OK to Recovered and fix some UX issues around disabling a rule while being in an error state (elastic#98135) [Fleet] Do not use async method in plugin setup|start (elastic#100033) Skip flaky functional test suite ...
…ut the exception builder into chunks by using react lazy loading (elastic#99989) ## Summary Trims down the list plugin size by breaking out the exception builder into a dedicated chunk by using React Suspense and React lazy loading. Before this PR the page load bundle size was `260503`, after the page load bundle size will be `194132`: You can calculate this through: ```ts node ./scripts/build_kibana_platform_plugins --dist --focus lists cat ./x-pack/plugins/lists/target/public/metrics.json ``` Before ```json [ { "group": "@kbn/optimizer bundle module count", "id": "lists", "value": 227 }, { "group": "page load bundle size", "id": "lists", "value": 260503, <--- Very large load bundle size "limit": 280504, "limitConfigPath": "packages/kbn-optimizer/limits.yml" }, { "group": "async chunks size", "id": "lists", "value": 0 }, { "group": "async chunk count", "id": "lists", "value": 0 }, { "group": "miscellaneous assets size", "id": "lists", "value": 0 } ] ``` After: ```json [ { "group": "@kbn/optimizer bundle module count", "id": "lists", "value": 227 }, { "group": "page load bundle size", "id": "lists", "value": 194132, <--- Not as large bundle size "limit": 280504, "limitConfigPath": "packages/kbn-optimizer/limits.yml" }, { "group": "async chunks size", "id": "lists", "value": 70000 }, { "group": "async chunk count", "id": "lists", "value": 1 }, { "group": "miscellaneous assets size", "id": "lists", "value": 0 } ] ``` ### Checklist Delete any items that are not applicable to this PR. - [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
Summary
Trims down the list plugin size by breaking out the exception builder into a dedicated chunk by using React Suspense and React lazy loading.
Before this PR the page load bundle size was
260503
, after the page load bundle size will be194132
:You can calculate this through:
Before
After:
Checklist
Delete any items that are not applicable to this PR.