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

"Buffer" polyfill bloats plugin bundles #107280

Closed
5 of 14 tasks
Dosant opened this issue Jul 30, 2021 · 14 comments
Closed
5 of 14 tasks

"Buffer" polyfill bloats plugin bundles #107280

Dosant opened this issue Jul 30, 2021 · 14 comments
Labels
enhancement New value added to drive a business result Feature:Maps 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 performance Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:EnterpriseSearch Team:Fleet Team label for Observability Data Collection Fleet team Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability

Comments

@Dosant
Copy link
Contributor

Dosant commented Jul 30, 2021

When Buffer is used in client or common code, webpack bundles a costly ~30kb polyfill. Looks like it does it per each plugin where Buffer is used. In some cases, it is possible to avoid using it in clientside code altogether, but probably we at least could share the Buffer polyfill across plugins.

Screen Shot 2021-07-30 at 13 07 17

Some clientside usages I found:

@Dosant Dosant added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Operations Team label for Operations Team enhancement New value added to drive a business result Team:AppServices labels Jul 30, 2021
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@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 Aug 2, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Aug 2, 2021
@jbudz jbudz removed the Team:Operations Team label for Operations Team label Sep 15, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Apr 19, 2022
@afharo
Copy link
Member

afharo commented Apr 29, 2022

While I agree that we should avoid using it, I created #130877 to move those polyfills to the UI Shared Deps.

@pgayvallet
Copy link
Contributor

@afharo with the polyfills being included in the shared deps, should we close this issue?

@afharo
Copy link
Member

afharo commented Apr 29, 2022

I wonder if we should keep it open to actually avoid using them and remove them from the shared deps. What do you think?

@afharo afharo added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Apr 29, 2022
@elasticmachine
Copy link
Contributor

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

@afharo afharo added Team:EnterpriseSearch Team:Fleet Team label for Observability Data Collection Fleet team labels Apr 29, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@afharo afharo added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Apr 29, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@afharo afharo added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Apr 29, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@afharo afharo added the [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation label Apr 29, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@afharo
Copy link
Member

afharo commented Apr 29, 2022

@pgayvallet I just ran an audit of all the places where it's used and pinged all the teams. If we think the effort is not worth it for reducing 40kB of page bundle load. I'd vote for closing the issue. @elastic/kibana-operations what do you think?

@spalger
Copy link
Contributor

spalger commented May 2, 2022

If we can get the work done to remove the buffer usage we could prevent it from being re-added with some basic Webpack config changed.

@jb1b84 jb1b84 added Feature:Maps and removed [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation labels Nov 3, 2022
@pgayvallet
Copy link
Contributor

@afharo agreed, let's close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Maps 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 performance Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:EnterpriseSearch Team:Fleet Team label for Observability Data Collection Fleet team Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability
Projects
None yet
Development

No branches or pull requests

7 participants