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

Reduce impact of metrics-graphics on bundle size #903

Closed
edmorley opened this issue Sep 14, 2018 · 1 comment
Closed

Reduce impact of metrics-graphics on bundle size #903

edmorley opened this issue Sep 14, 2018 · 1 comment

Comments

@edmorley
Copy link

edmorley commented Sep 14, 2018

Hi :-)

The README currently says:

MetricsGraphics.js is a library optimized for visualizing and laying out time-series data. At under 80KB (minified), ...

However it actually causes a 385KB (minified) increase in bundle size:
https://bundlephobia.com/result?p=metrics-graphics@2.15.6

This is larger than react+react-dom (96KB), jQuery (85KB), lodash (69KB), bootstrap (49KB) and flot (32KB)
...all added together! (And I don't think this is even including the CSS)

Whilst 70% of the 385KB comes from the dependencies of metrics-graphics - the weight they add can't just be written off when discussing its size, since it's the way that metrics-graphics is structured/bundled that causes all of them to be included even if they are not used.

It's also worth noting that d3 got quite a bit larger in v5 (compare v4 and v5) which is not included in the above (since the v5 upgrade is only on master) - so the issue is going to be even worse in the next release / over time as the d3 package ecosystem gets larger.

Things that would likely help with this:

@jens-ox
Copy link
Member

jens-ox commented Apr 27, 2020

Hi! Please see #929 -- the new version comes at ~10kB minified and gzipped.

@jens-ox jens-ox closed this as completed Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants