Skip to content
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

[meta] All page load bundle must be under 100kB #95853

Closed
tylersmalley opened this issue Mar 30, 2021 · 4 comments
Closed

[meta] All page load bundle must be under 100kB #95853

tylersmalley opened this issue Mar 30, 2021 · 4 comments
Labels
impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort Meta Team:Operations Team label for Operations Team

Comments

@tylersmalley
Copy link
Contributor

tylersmalley commented Mar 30, 2021

One of our goals is to keep Kibana fast. A large part of this is to reduce the amount of Javascript that is downloaded and parsed on each page load. We have for some time provided bundle size metrics on pull requests. From the docs:

The size of the entry file produced for each bundle/plugin. This file is always loaded on every page load, so it should be as small as possible. To reduce this metric you can put any code that isn’t necessary on every page load behind an async import().

Code that is shared statically with other plugins will contribute to the page load bundle size of that plugin. This includes exports from the public/index.ts file and any file referenced by the extraPublicDirs manifest property.

Since these files are loaded on every page load, it's important to keep this size to minimum. We have documentation to assist with reducing these bundle sizes through code splitting.

Here are some examples of plugins implementing code-splitting:

While we do have the limits.yml, we would like to institute a ceiling of 100k and in order to accomplish this, we need all plugins to get under that limit.

@tylersmalley tylersmalley added Team:Operations Team label for Operations Team Meta labels Mar 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@tylersmalley tylersmalley changed the title [meta] All page load bundle must be under 100k [meta] All page load bundle must be under 100kb Mar 30, 2021
@tylersmalley tylersmalley changed the title [meta] All page load bundle must be under 100kb [meta] All page load bundle must be under 100kB Mar 30, 2021
@mshustov
Copy link
Contributor

Let's update limit values https://github.com/elastic/kibana/blob/master/packages/kbn-optimizer/limits.yml at the part of this issue. There are some numbers outdated there.

@tylersmalley tylersmalley added 1 and removed 1 labels Oct 11, 2021
@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Oct 12, 2021
@tylersmalley tylersmalley removed loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels Mar 2, 2022
@tylersmalley
Copy link
Contributor Author

@danielmitterdorfer this is probably something we want to move to the performance working group and could use some help pushing. This is really something that ALL web applications deal with and something that should be no different for anyone developing plugins in Kibana. 100kB is really just the bare minimum considering there is 160+ plugins.

@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort labels Mar 2, 2022
@tylersmalley tylersmalley removed loe:small Small Level of Effort impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. EnableJiraSync labels Mar 16, 2022
@lizozom
Copy link
Contributor

lizozom commented Apr 18, 2022

@tylersmalley and @danielmitterdorfer
I've merged PRs from this issue into #88678
I'm closing this issue and we can continue any related conversations there.

On a side note, I do think that we need to justify and prove whether bundle splitting is a good strategy in the long term in our performance tests.

@lizozom lizozom closed this as completed Apr 18, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Apr 18, 2022
@exalate-issue-sync exalate-issue-sync bot added impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort labels Apr 18, 2022
@tylersmalley tylersmalley reopened this Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:small Small Level of Effort Meta Team:Operations Team label for Operations Team
Projects
None yet
Development

No branches or pull requests

4 participants