On Wed, Mar 19, 2008 at 1:10 AM, DanTMan <dan_the_man(a)telus.net> wrote:
I may have made a mistake on a few of the percentages
(just rounding
errors)... But minifying does shave at least 1/4 the size off the file.
Additionally, that would grow even more if we decided to document
everything inside of wikibits.js nicely in a format we could throw
something similar to MW's doxygen through, to get some nice
documentation on the JS inside of wikibits. Additionally, as you can
see, when gzipped rather than shaving 1/4 the file, we shave nearly 1/2
the file off. And honestly, as noted, we can't send a gzipped file 100%
of the time, so having minification is good since we still get some
reduction even when the browser does not support gzip. And when it does,
we end up with less than 1/5 the size of the original file.
What it looks like to me is we save about 5 KB on a first page load.
Say 10 KB if you count the CSS too. A first page load of the enwiki
main page is probably around 80 KB right now, at a rough guess, if you
count everything. So we're talking what, 15% savings?
Hmmm... multiple includes rather than one file...
Ok... but that's going
to need a bit more complex logic than before to make sure that
dependencies are included in the right order.
You need to make sure they're concatenated in the right order anyway.