Thomas Wittek schrieb:
>
>
> On Nov 29, 8:50 pm, W-Mark Kubacki <[EMAIL PROTECTED]> wrote:
>> I assumed a single minimized file would be optimal, too, but my tests have
>> revealed that this only pays off at the first page load, when files and
>> headers
>> are exchanged for the first time.
>
> Yahoo suggests minimizing the HTTP requests as far as possible:
> http://developer.yahoo.com/performance/rules.html#num_http
> I saw a talk of Steve Souders where he showed that still many clients
> (~50%) do request the files.
> Probably because a lot of users only visit the page only once in a few
> days.
>
> Cite from http://almaer.com/blog/steve-souders-on-web-performance:
> "Since the cache matters, Steve then did a browser cache experiment.
> He added an image to a page and calculated the % of users with an
> empty cache, and the % of page views too.
> Over time ~50% users, ~20% page views. Wow, so you thought that
> caching was great.... but you get a lot of hits with an empty cache!"
>
> Link to the talk: http://youtube.com/watch?v=BTHvs3V8DBA
>
> So probably, I'll take a look at this CP filter thingy ;)
May I suggest an alternative? I've been pondering about the issue
myself, but so far didn't find the time to really delve into it.
However, the one logical place for dealing with this is
turbogears/controllers.py
Granted, manipulating this would mean to use a patched version of TG for
a while, but I guarantee you I'd be having a gratious attitude about
accepting the resulting patch :)
If you look at the _process_output function, you'll notice that there
are the various JS-scripts/links collected.
for l in iter(js_location):
output["tg_js_%s" % str(l)] = js[l]
Putting a call in there that takes the list of JS*-objects and returns a
new one, possibly altered to contain a single (or fewer) scripts,
concatenated & packed, should be easy enough. And it would quite
naturally open up possibilities for plugging different strategies for
compacting.
CSS is dealt with at the same place, btw.
The big advantage over the filter: you don't need to parse the already
generated output once again, which essentially adds latency to the
request. And is tedious.
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---