[Refactor][Performance] Migrate addTriggerAction to addTriggerActionAsync#227593
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
42d456b to
07e4ba4
Compare
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM. Does this migrate all actions? Could deprecated addTriggerAction and registerAction methods be removed?
code review only
|
@nreese Unfortunately not yet — there are still quite a few in ML and other areas. I only removed the ones from the Analyst Experience team. |
Thanks for checking. |
6347f63 to
9ea265b
Compare
f4df44e to
1f0f36e
Compare
janmonschke
left a comment
There was a problem hiding this comment.
kibana-cases changes lgtm
darnautov
left a comment
There was a problem hiding this comment.
AIOps changes tested and LGTM, but I wonder if it'd be better to create an aggregated export file to reduce a number of asynchronous chunks?
Hey @darnautov it crossed my mind tbh. I think they are so small that it's ok we'll create just one chunk where all actions will be loaded after one is requested, but opted for simplicity here. I'll add a commit to fix it. Thanks! |
…tion/migrate_add_trigger_action
umbopepato
left a comment
There was a problem hiding this comment.
The refactored actions work correctly, RO code changes LGTM!
Added a small suggestion 🙂
x-pack/platform/plugins/shared/cases/public/components/visualizations/actions/register.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsasync chunk count
References to deprecated APIs
History
|
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
# Summary Hi Operations team! 👋 Recently I've worked on a [few](elastic#227593) [PRs](elastic#226052) that reduce our page load bundle size, and while doing so I noticed that many of our limits are much higher than the actual page load sizes. It made me think: these limits should be realistic, because they’re one of the main ways we protect page load performance. Right now, based on the current limits, we theoretically allow up to 11,452,104 bytes (~11 MB) to load upfront. But when we check the real page load, it’s only 5.192.979 bytes — about half of that. We already have a `--update-limits` flag for the `node scripts/build_kibana_platform_plugins.js --update-limits` command, but it only bumps limits up when the size grows above the limit, adding a flat 15 KB buffer to the bundle size. I’d like to propose: 1. Allowing the `--update-limits` to allow folks to also lower limits when the bundle shrinks drastically 2. Replacing the flat 15 KB buffer with 10% of the plugin’s size, so the buffer scales realistically. Right now, with ~197 plugins, `--update-limits` allows for an extra (15KB*197=) 3 MB above the total page size — which is way too much in my opinion! ## What’s in this PR ✅ Adds logic to let us lower limits automatically, not just bump them up with `node scripts/build_kibana_platform_plugins.js --update-limits` ✅ Replaces the flat +15 KB bump with a 10% buffer relative to each plugin’s size when using `node scripts/build_kibana_platform_plugins.js --update-limits` ✅ Updated the limits.yml with the result from the above script ## Why it matters 1. Keeps bundle sizes tight 2. Protects us from accidental regressions
…sync (elastic#227593) ## Summary Just a few migrations to lower the page load. Part of elastic#227743 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
# Summary Hi Operations team! 👋 Recently I've worked on a [few](elastic#227593) [PRs](elastic#226052) that reduce our page load bundle size, and while doing so I noticed that many of our limits are much higher than the actual page load sizes. It made me think: these limits should be realistic, because they’re one of the main ways we protect page load performance. Right now, based on the current limits, we theoretically allow up to 11,452,104 bytes (~11 MB) to load upfront. But when we check the real page load, it’s only 5.192.979 bytes — about half of that. We already have a `--update-limits` flag for the `node scripts/build_kibana_platform_plugins.js --update-limits` command, but it only bumps limits up when the size grows above the limit, adding a flat 15 KB buffer to the bundle size. I’d like to propose: 1. Allowing the `--update-limits` to allow folks to also lower limits when the bundle shrinks drastically 2. Replacing the flat 15 KB buffer with 10% of the plugin’s size, so the buffer scales realistically. Right now, with ~197 plugins, `--update-limits` allows for an extra (15KB*197=) 3 MB above the total page size — which is way too much in my opinion! ## What’s in this PR ✅ Adds logic to let us lower limits automatically, not just bump them up with `node scripts/build_kibana_platform_plugins.js --update-limits` ✅ Replaces the flat +15 KB bump with a 10% buffer relative to each plugin’s size when using `node scripts/build_kibana_platform_plugins.js --update-limits` ✅ Updated the limits.yml with the result from the above script ## Why it matters 1. Keeps bundle sizes tight 2. Protects us from accidental regressions
…sync (elastic#227593) ## Summary Just a few migrations to lower the page load. Part of elastic#227743 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Just a few migrations to lower the page load. Part of #227743