Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Weightof.it – Compare JavaScript libraries by file size (weightof.it)
25 points by stefanrush on June 22, 2015 | hide | past | favorite | 18 comments



It doesn't seem to compare the minified + gzipped library sizes. That's the most important metric to me. Who still serves comments in JS?


It compares the minified files so no comments. You raise a good point about gzipping though. I was operating under the assumption that the libraries would be compressed at the the same ratio so minified file size would be a good comparison. This probably isn't entirely accurate though. I'll have to look into it a bit more. Thanks for your feedback!


To illustrate this point, React min+gzip is about 40 KB: https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.mi... not 121 KB.


I think what I'm going to do is add a checkbox at the top that will let you toggle between the gzipped and non-gzipped weight.

After doing some research it looks like larger libraries with more redundancy will benefit more from gzipping than smaller libraries. So relative to uncompressed file size, React will be compressed more than say Backbone.

Definitely going to add this in. Thanks again.


I would suggest the second metric to be labelled as "dry weight".


I added that toggle gzip checkbox. Thanks again for the push.


Nice! I had fun with this, especially comparing Ember's half a meg footprint to Backbone's 20K. One helpful data point could be whether the library supports a (formal) custom build apparatus, since you can often get a sizable reduction that way. Full jQuery UI clocks in at ~242K, but using http://jqueryui.com/download/ you can often strip it down to 20K or less. Similarly with THREE.js and several others. Going in the other direction, a library that seems small (Backbone.js, @ ~20K) may actually end up being relatively heavy because of required external dependencies. A more explicit side-by-side "compare" function would also be nice here, comparing library size along with other metrics like script loader compatibility, maintenance frequency, different flavors of popularity, etc.


It's not very fair to compare Ember's size with Backbone's as Backbone implements just a very small subset of Ember's functionality.

Also, it seems that the sizes are outdated because the latest build of Ember.js is 478KB (see http://builds.emberjs.com/release/ember.min.js).


Thank you! I was actually unaware that Ember has separate versions for production and dev. I was using the dev version which I assume has extra features for debugging. I just updated it with the correct version. Sorry Ember...


No worries, thanks for correcting!


Thanks for the feedback. Great point on modular libraries. I definitely thought about that during development. I just couldn't find a good way to implement it. Some libraries like Modernizr have billions of possible permutations.

I also like the idea of comparing other metrics. Definitely something I'll look at going forward.


Ember is ~75k gzipped, so that comparison is moot.


Nice comparisons site, but when I quickly mouse over thorugh list items, because of the animation it seems like a small earthquake is going on :)


Really appreciate the feedback. Thank you. It's fixed :)


I just tried contributing a library but it's not showing up in the site. No error either.


Thank you for contributing! I have approve them before they appear to prevent people from spamming. I just checked and was surprised to see 22 libraries awaiting approval. Awesome feeling. I was not expecting that. I'll be able to go through them tonight.

I did just add a flash message users will see after they make a contribution though. Thanks for the feedback. And thanks to everyone who contributed a library.


Didn't look at the source- how are you determining popularity?


GitHub stars




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: