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

[canvas] Reduce page load bundle to under 100kB #95857

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

[canvas] Reduce page load bundle to under 100kB #95857

tylersmalley opened this issue Mar 30, 2021 · 7 comments
Assignees
Labels
Feature:Canvas impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects

Comments

@tylersmalley
Copy link
Contributor

tylersmalley commented Mar 30, 2021

For details, refer to the meta issue at #95853

The canvas plugin is currently 528,634 bytes. To consider this issue closed, the limits.yml should be updated with the value under 100000.

This is an issue to track any bits of canvas that can help reduce main entry bundle size

  • LoDash is 24% of the bundle. I think we load the full lodash, so we should probably switch to loading the individual functions we need and that would be a big quick win. I think this was handled by moving LoDash to a shared bundle
  • Handlebars is 8%. I think we use handlebars when compiling our markdown? That can probably be pulled out of the main bundle and not loaded until Canvas is loaded. Handled by [Canvas] Move Handlebars and Flot dependencies out of main bundle #78542
  • Flot is also about 8%. That should also be able to be pulled out of the main bundle. Handled by [Canvas] Move Handlebars and Flot dependencies out of main bundle #78542
  • our i18n strings are 12.5% of the total bundle. Those get pulled into the main bundle because some of those strings are needed for adding functions to interpreter, which happens on setup and not when Canvas is actually loaded. Could strategically split those out maybe?
  • node_modules is almost half of our bundle. Investigate what is pulling in all of those modules and figure out how to get them off the main entry.
  • Canvas shareable runtime has doubled in size #128526
@tylersmalley tylersmalley added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Mar 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@tylersmalley tylersmalley changed the title [canvas] Reduce page load bundle to under 100k [canvas] Reduce page load bundle to under 100kb Mar 30, 2021
@tylersmalley tylersmalley changed the title [canvas] Reduce page load bundle to under 100kb [canvas] Reduce page load bundle to under 100kB Mar 30, 2021
@tylersmalley
Copy link
Contributor Author

Canvas is now over half a megabyte. Any chance to get this work on the roadmap to reduce the initial page load of Canvas. This is loaded on ALL requests to Kibana and affects the overload page-load of the application.

@tylersmalley
Copy link
Contributor Author

Currently 489,159kB

@kibanamachine kibanamachine added this to Inbox in Canvas Jul 5, 2022
@nreese nreese added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Mar 23, 2023
@cqliu1 cqliu1 added the loe:large Large Level of Effort label Mar 23, 2023
@ThomThomson ThomThomson added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. and removed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Apr 6, 2023
@cqliu1 cqliu1 self-assigned this Apr 18, 2023
@thomasneirynck
Copy link
Contributor

We should prioritize this, since all kibana users are affected according to #84793 (comment)

@thomasneirynck
Copy link
Contributor

@ThomThomson seems like this is no longer the case (?)

@ThomThomson
Copy link
Contributor

See this PR for more info. Unless something unexpected happens with that, it looks like the limit should actually have been 29355 and it was set much higher accidentally?

@ThomThomson
Copy link
Contributor

Closing as the canvas page load bundle is 29kb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Canvas impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:large Large Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
No open projects
Canvas
  
Inbox
Development

No branches or pull requests

7 participants