Create a gist now

Instantly share code, notes, and snippets.

Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – Angular, Ember and React.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan  4 22:03 angular2.min.js
563K Jan  4 22:05 angular2.0.0-beta.0-all.umd.min.js
486K Jan  4 21:50 ember.1.13.8.min.js
435K Jan  4 21:48 ember.2.2.0.min.js
205K Jan  4 22:06 angular2.0.0-beta.0-Rx.min.js
144K Jan  4 21:59 react-with-addons-0.14.5.min.js
143K Jan  4 21:46 angular.1.4.5.min.js
132K Jan  4 21:56 react-0.14.5.min.js
121K Jan  4 21:35 angular.1.3.2.min.js
5.3K Jan  4 22:00 redux-3.0.5.min.js
706B Jan  4 21:57 react-dom-0.14.5.min.js
63K  Oct 13 03:02 vue-2.0.3.min.js
This gives us following approximations
Name Size
Ember 2.2.0 435K
Ember 1.13.8 486K
Angular 2 566K
Angular 2 + Rx 766K
Angular 1.4.5 143K
React 0.14.5 + React DOM 133K
React 0.14.5 + React DOM + Redux 139K

GZipped

$ gzip -r .
$ ls -lhS
123K Jan  4 22:11 ember.1.13.8.min.js.gz
119K Jan  4 22:11 angular2.0.0-beta.0-all.umd.min.js.gz
111K Jan  4 22:11 ember.2.2.0.min.js.gz
111K Jan  4 22:11 angular2.min.js.gz
51K Jan  4 22:11 angular.1.4.5.min.js.gz
45K Jan  4 22:11 angular.1.3.2.min.js.gz
42K Jan  4 22:11 react-with-addons-0.14.5.min.js.gz
39K Jan  4 22:11 react-0.14.5.min.js.gz
32K Jan  4 22:11 angular2.0.0-beta.0-Rx.min.js.gz
1.9K Jan  4 22:11 redux-3.0.5.min.js.gz
455B Jan  4 22:11 react-dom-0.14.5.min.js.gz
23K  Oct 13 03:02 vue-2.0.3.min.js.gz
Approximations for GZipped versions
Name Size
Ember 2.2.0 111K
Ember 1.13.8 123K
Angular 2 111K
Angular 2 + Rx 143K
Angular 1.4.5 51K
React 0.14.5 + React DOM 40K
React 0.14.5 + React DOM + Redux 42K
React 15.3.0 + React DOM 43K
Vue 2.0.3 23K
@coryhouse

Thanks so much for compiling these and sharing them!

@Restuta
Owner
Restuta commented Jan 6, 2016

@coryhouse you are very welcome =)

@nii236
nii236 commented Jun 3, 2016

How does React 15 compare to 0.14?

@PhilippMeissner
PhilippMeissner commented Jun 23, 2016 edited

You just saved me a good amount of time - Thanks!
Are you interested in adding more information to this, like the sizes of Elm or other popular/raising framworks?

@nueverest

As of today Angular 2 beta 17 minified is around 620kB.

https://cdnjs.com/libraries/angular.js/

@keyboardSmasher

In an age where everyone in the free world has ridiculous bandwidth, does the size of the javascript framework really matter? I do appreciate your efforts, and the size difference is interesting.

@Restuta
Owner
Restuta commented Aug 15, 2016

@keyboardSmasher it does for the world:

The average connection speed for Internet users worldwide, not just among these 50 countries, but all countries, is an average of 1.8 Mbit/s. As an average, this is actually pretty good, but as you’ve seen, there are plenty of extremes in either direction.

source http://royal.pingdom.com/2010/11/12/real-connection-speeds-for-internet-users-across-the-world/

Also browser has to evaluate JS and that is still kind of slow on mobile devices (https://meta.discourse.org/t/the-state-of-javascript-on-android-in-2015-is-poor/33889), so size is a good predictor of both, time to download and time to evaluate.

@Restuta
Owner
Restuta commented Aug 15, 2016

@PhilippMeissner probably not, but feel free to fork and do that. With Elm in particular I am not sure how to evaluate, since it's basically a compiler and not a library.

@Restuta
Owner
Restuta commented Aug 15, 2016

@nii236 15.3.0 is 43K gzipped

@jamesbondo

angular2 is a graller

@mjdude
mjdude commented Aug 24, 2016

Thanks for compiling this. It's really informative.

@noahcollins
noahcollins commented Sep 1, 2016 edited

@keyboardSmasher even if most of your users have fast connections, fitting your render-critical bytes under the ~14KB TCP CWND threshold means no round trips to finish downloading the main payload. That's the top of your document, your critical CSS, and any critical app JS (if you're not rendering on server) -- all in about 14KB. The outcome is much quicker first paint and first useable paint. I find projects like preact and inferno to be very interesting for this reason.

All users regularly experience transient latency spikes, dropped packets, and so on. Browsers do a great drop masking network issues where they can, but if your "critical" bundle is large enough to require two, three, or more TCP round trips, your high-percentile render times will spike up accordingly. With an optimized bundle, you minimize the performance impact caused by varying network conditions and narrow the gap between your median and 90th percentile render times.

And to @Restuta's point, JS is expensive on mobile. The less JS that needs to be initially evaluated, the better your users' load times and battery life.

@nkoehring

@noahcollins Thanks for this interesting addition. Could you point me to more information about the transition window size? I found a lot of documentation and RFCs but I wonder how you got to the 14KBs. All I found was that it is calculated, not static.

@GabrielDelepine
GabrielDelepine commented Sep 7, 2016 edited

here @mgechev (Angular 2 core dev) explain how to produice a "Hello world" with Angular 2 under 50ko.

@agauniyal

@keyboardsmasher depends on what your target audience is. In a country like India, your statistics are pretty screwed up, where there are 60kbps connections an average and a city's target audience greater than some country's, these factors play a role.

@ShaggyDude

Meteor?

@farouk2u

Thank you for sharing 👍

@Restuta
Owner
Restuta commented Nov 5, 2016

@ShaggyDude feel free to PR, have no idea about Meteor.

@Restuta
Owner
Restuta commented Nov 5, 2016

@shshaw added

@andrewshatnyy

Backbone?

@pitaj
pitaj commented Dec 1, 2016

FYI you left out Vue from the top table

@Mirodil
Mirodil commented Dec 7, 2016

aurelia?

@trughooputh

Thank you !

@jpoechill

Beautiful

@NishantDesai1306

When whole app is made live then it will have other files as well in which business logic is implemented so I think that size of framework is just like adding a swimming pool to the river, and thinking about whether to add public swimming pool or olympic swimming pool.
The point I'm making is that it will not make any big difference to the water-level of river.
Correct me if I'm wrong.

@Restuta
Owner
Restuta commented Dec 19, 2016

@NishantDesai1306 correcting you, since you are wrong :) it depends on your app of it's a river or a small water drop. In my experience there are a lot of small/medium sized apps where extra 50-200 on makes a difference. Also framework size correlates with time it takes to evaluate this JS code when it's loaded by browser.

Also this is not the right place to debate if the size matters for some/most apps, its vice versa, of you think it is — this is a useful gist for you.

@MajorScruffy

What about Angular 2 without the compiler.
In a real world scenario you would use ahead of time compilation:
https://www.youtube.com/watch?v=_VnV7R4Ncwc

@thovo
thovo commented Jan 3, 2017

Many thanks! Please allow me to use the number in my presentation! May we get an update on the size of each framework now?

@Restuta
Owner
Restuta commented Jan 5, 2017

@MajorScuffy can you provide me with cdnjs link to a bundle you are referring to?

@Restuta
Owner
Restuta commented Jan 5, 2017

@thovo sure go ahead, can't promise update, but I can update the gist from your fork (if you'll create one)

@variable-content
variable-content commented Jan 21, 2017 edited

@Restuta For Angular 2, clone this repo: https://github.com/blacksonic/angular2-aot-webpack, and run npm i && npm run build. It produces a slightly sub-optimal build that produces two app js files totaling 370kb, 90kb gzipped.

Also, I don't think it's accurate to include the examples with the Angular 2 + the entire RxJs library, the entire RxJs API is quite large and apps just need to include the functions they use, which is usually a much smaller subset of the entire library.

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