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

How to avoid shipping 400kb of unused Keen.js #441

Open
TheLarkInn opened this issue Feb 15, 2018 · 2 comments
Open

How to avoid shipping 400kb of unused Keen.js #441

TheLarkInn opened this issue Feb 15, 2018 · 2 comments

Comments

@TheLarkInn
Copy link

Hi!!! I'm Sean, one of the maintainers of a JavaScript library called webpack. Maybe you've heard of it?

Regardless, I was doing some performance evaluations live on stream, and I noticed that it was really really hard for users to be able to optimize the code from keen.min.js.

image

As you can see here, the average user, will only consume about 18-20% of the code and this can lead to huge performance 🔥🚨bottlenecks🔥🚨!

So I was wondering, would you accept a PR for this library to be broken into modular ESM pieces? If so, I'm sure we could have a bundled version for the web, and ship the raw modules. Likely if you are all using this in house, it could greatly benefit your own websites, which are being slowed down by this module!!!

Thanks so much for considering the request.

@dustinlarimer
Copy link
Contributor

@TheLarkInn thanks for the note- please check out the 3 modules that make up this package: https://github.com/keen/keen-js#installation

Loading these independently should help you find the saving you're looking for. The full release includes D3.js and C3.js. Also, I'm no longer with Keen – just dropping in to help. If you need anything from them in particular I recommend hitting any of their published support channels.

@grain209
Copy link
Contributor

grain209 commented Jun 6, 2018

Hi @TheLarkInn ,

We've just published new versions of our 3 core libs.

  • https://github.com/keen/keen-tracking.js (37 KB minified, under 12 KB gzipped)
    Keen-tracking is the only package required to track events on websites with high traffic.
  • https://github.com/keen/keen-analysis.js (70 KB minified, under 21 KB gzipped)
    Keen-analysis allows you to make custom queries to already saved events. This package is used most of the time in pair with Keen Dataviz
  • https://github.com/keen/keen-dataviz.js (502 KB minified, under 132 KB gzipped)
    Keen-dataviz allows you to visualize your data. Its engine is based on C3/D3.js. Some people prefer other dataviz libs like Chart.js (523 KB), Highcharts etc.

Thanks!

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

No branches or pull requests

3 participants