On Wed, Apr 21, 2010 at 11:40 AM, Owen Nelson <onel...@gmail.com> wrote:
> Jacob Kaplan-Moss wrote:
>> If you'd like to look into it, a good place to start would be by
>> looking at the existing static asset management tools in the ecosystem...
>>
> I most certainly would like to.  I'll prepare a "report" with my findings.

I'm an enthusiast on this topic -- if you haven't yet, have a look at
YSlow and Souder's two books:
http://www.stevesouders.com/hpws/
http://www.stevesouders.com/efws/

FWIW, I think GWT took an early lead with image bundling (automated
creation of sprites).  Lots of frameworks have caught up to that, but
they may have improved their lead since I last looked.

More recently, Cappuccino added some great support for bundling-- in
particular, I was interested in their cross-browser approach for
inlining content.
http://cappuccino.org/discuss/2009/11/11/just-one-file-with-cappuccino-0-8/

These aren't something we could easily incorporate.  Just automating
JS and CSS bundling and compression would be a big help.  This is a
good place to start on that:
http://stackoverflow.com/questions/28932/best-javascript-compressor

I've played off and on with making great asset handling for Django.
We had something to do automated spriting at Pegasus, but I don't have
that code any more (their IP).  For example, avatars for the X most
frequent commenter's avatars:
http://media.pegasusnews.com/pegasus/bundles/img/8a339a7ffaf8e89432732f3d7c67ede6.jpg

In general, I found it difficult to provide great support without some
heavy JS, and picking a JS framework would make it difficult to
include in core.  Also, we used a media server 404 handler for
thumbnailing, which is outside the range of Django; maybe Sorl has a
better answer here.

This presentation has some nice ideas, too:
http://assets.en.oreilly.com/1/event/29/The%20Secret%20Weapons%20of%20the%20AOL%20Optimization%20Team%20Presentation.pdf
(SONAR, particularly-- nothing is faster than skipping load of
something that isn't actually needed.)

One more idea that I haven't seen anyone doing yet is to inline
content that would miss the browser cache, and background load any
assets likely to be needed later.  Roughly speaking, there would be a
cookie whose value is a bloom filter of which assets have been
downloaded to local cache.  On a request, the server would inline all
assets needed for the page, and set up background loading of any
high-priority assets, updating the cookie as loads occurred.  Total
transfer would be higher (due to overlap between inlined and
backgrounded loads), but perceived response time should be hugely
improved.

Thanks for your interest in this topic!

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to