Ya, they need to be included in the right order. But the more complex
logic is that we now need to deal with it through multiple scopes and
make sure that it's loaded in the correct scope, not overrided in the
lower scopes... Without the multiple scopes it's a simple task of adding
things to load on calls, adding their dependencies to that list, and
ordering them correctly.
Well, whether or not we minify wikibits.js the system is going to
support minification, because if it doesn't there will be load issues
when you start including the big libraries like YUI. Though, being able
to serve minified versions of the core css and js would be nice at least
as a configuration option. It may only be 15%, but don't forget that
even that slowly adds up to many gigs of bandwidth on sites with high
visitor traffic.
Oh ya... and as for cache:
http://yuiblog.com/blog/2007/01/04/performance-research-part-2/
"40-60% of Yahoo!'s users have an empty cache experience and ~20% of all
page views are done with an empty cache. ... It says that even if your
assets are optimized for maximum caching, there are a significant number
of users that will /always/ have an empty cache."
While that was targeted at Yahoo!, that fact could easily apply
elsewhere. Especially with how many different people visit wiki.
~Daniel Friesen(Dantman) of:
-The Gaiapedia (
http://gaia.wikia.com)
-Wikia ACG on
Wikia.com (
http://wikia.com/wiki/Wikia_ACG)
-and
Wiki-Tools.com (
http://wiki-tools.com)
Simetrical wrote:
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.
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l