

Show HN: Weightof.it – Compare JavaScript libraries by file size - stefanrush
http://weightof.it/

======
Rygu
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?

~~~
stefanrush
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!

~~~
Rygu
To illustrate this point, React min+gzip is about 40 KB:
[https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.mi...](https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.min.js)
not 121 KB.

~~~
stefanrush
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.

------
codingthebeach
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/](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.

~~~
yoran
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](http://builds.emberjs.com/release/ember.min.js)).

~~~
stefanrush
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...

~~~
yoran
No worries, thanks for correcting!

------
CSDude
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 :)

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

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

~~~
stefanrush
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.

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

~~~
stefanrush
GitHub stars

