[dev] [cvs] commit: framework/Horde Horde.php

Michael M Slusarz slusarz at horde.org
Mon Jul 13 16:15:05 UTC 2009


Quoting Jan Schneider <jan at horde.org>:

> Excuse any comments that are obsolete by later commits, everyone,  
> while I'm catching up with the commit messages.
>
> Zitat von Michael M Slusarz <slusarz at horde.org>:
>
>> slusarz     2009-06-29 01:42:05 EDT
>>
>>  Modified files:
>>    Horde                Horde.php
>>  Log:
>>  Move RFC 2397 generation code from IMP to Horde.
>>
>>  Revision  Changes    Path
>>  1.723     +25 -4     framework/Horde/Horde.php
>>
>>  Chora Links:
>>   
>> http://cvs.horde.org/diff.php/framework/Horde/Horde.php?rt=horde&r1=1.722&r2=1.723&ty=u
>>
>> --
>> To unsubscribe, mail: cvs-unsubscribe at lists.horde.org
>>
>
> We really don't want to send image data for every small image, do  
> we? Beside bloating the HTML source instead of taking advantage of  
> image caching, we'd also have two file stat calls for every img()  
> call.

Yes, we do - at least from a performance standpoint.  First, there is  
not 2 stat() calls for each image call - file stats are cached by PHP  
during an access.  Regardless, these same file stat calls are needed  
by the HTTP server on an image request anyway so at worst this is a  
wash.

Second, even with the increased max connections per domain in the new  
browsers, you still generally can't download more than 6 images at  
once.  For pages with a lot of images, there is still a very  
noticeable lag in loading.

Third, it is important to think about installations serving pages via  
HTTPS.  In this case, there is no caching of images.

It is still best to do all of this via CSS/sprites.  But this is a  
tedious, manual process that requires a total revamp of the page's  
markup to do properly.  I've converted most of dimp, but it took me  
the better part of the month.  I don't have the link handy, but IIRC  
the Yahoo team discovered that reducing the number of HTTP requests  
(whether that data is cached locally or not) is the single fastest way  
to decrease page loading times.  So it is a worthwhile goal, even if  
that means we have to clean up a few img() calls along the way.

michael

-- 
___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list