Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Final minified file size of analytics.min.js is larger than 100KB? #351

Closed
jsilveira opened this issue Feb 11, 2014 · 3 comments
Closed

Comments

@jsilveira
Copy link

Rebuilding analytics-integrations with only two plugins (google analytics and kissmetrics) analytics.min.js is still a little bit over 100KB. Is that correct? Am I missing a way to reduce its size? If not, isn't that huge for a performance sensitive website?

@ianstormtaylor
Copy link
Contributor

Haven't tried the build with those specific two, but gzipped it's probably ~20k, which shouldn't mean much of anything if you're loading it async. And if you're using the hosted version we automatically strip out the unnecessary integrations for you and load async so you never have to worry about that stuff.

There's also an aliasing fix related to this component builder thread that will remove the need for the verbose require aliases in the built file, and get size down even more as soon as it makes it into core.

@reinpk
Copy link
Contributor

reinpk commented Mar 13, 2014

@yields about 25% of the characters in the compiled analytics.min.js are require.alias() calls, is there an easy way to trim that down by any chance?

@calvinfo
Copy link
Contributor

@reinpk, this is something we're waiting on component builder for at the moment. If you use component, you can also take advantage of shared components by packaging analytics.js with your entire build, so there's no wasted space!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants