LABjs: new hotness for script loading. Created in collaboration with Steve Souders, LABjs is a JavaScript loading library which makes it easy to have scripts download in parallel while still ensuring that they execute sequentially where required to ensure dependencies are met. It’s unclear how you would decide to use this over concatenating all scripts together in to a single file.
Don't know how they compare in general but Req has concatenation support built in:
http://mar.anomy.net/entry/2009/10/20/23.39.22/
Borgar - 26th November 2009 23:09 - #
I happen to believe that concat'ing everything into one file is rarely the right path. Certainly you want to reduce HTTP requests, but a single file will always load totally serially, byte-by-byte, and eliminates any possibility to parallel load, a key feature of LABjs.
Breaking your site code into even 2 files and loading both in parallel with LABjs will easily close to halve the tiem it takes to load your JavaScript. Especially for large concat'd JS files, doubling the speed of loading can make a significant impact on the performance of your page's load.
However, even if you still want and insist on one file, LABjs assists in loading that file dynamically, in parallel to the rest of the page's resources (images, CSS, etc), something the normal script tag cannot do well and reliably.
Kyle Simpson - 27th November 2009 00:38 - #
To elaborate more on this topic, I've put up this blog post to help explain my position more in depth:
http://blog.getify.com/2009/11/labjs-why-not-just- concat/
Kyle Simpson - 28th November 2009 06:28 - #
You can't concatenate files you don't control such as the major CDN hostings of common JS libraries.
Jeremy Dunck - 2nd December 2009 01:12 - #
ugg pas cher - 29th October 2011 02:56 - #