[horde] How to improve waiting times for ajax requests?

Michael M Slusarz slusarz at horde.org
Fri Apr 19 17:50:53 UTC 2013


Quoting Oscar del Rio <delrio at mie.utoronto.ca>:

> On 04/19/13 12:12 PM, Michael M Slusarz wrote:
>>
>> You are using filesystem caching as directed in the config file,  
>> right?  Compressing javascript on every pageload obviously makes no  
>> sense otherwise and you would be spreading FUD by making claims of  
>> "disabling compression makes things faster!" since that is a  
>> blatantly incorrect statement.
>>
>
> In my case, disabling cache compression makes "first load"  
> significantly faster.

This is correct,and expected.  Once the static javascript cache has  
either been cleared -or- there is a difference in the composition of  
the javascript package for a page, which normally won't happen  
until/unless a version changes, a new javascript compressed "package"  
must be generated.  A "package" means the unique set of javascript  
files included in the page (not including the base prototype class  
which is loaded separately, since it is loaded on every page that uses  
javascript).

Depending on the JS compressor used, this generation will take a few  
seconds.  This will only happen ONCE, to the FIRST person to visit the  
page.  Everybody else that visits the page will not experience this.   
This means that on a busy server (10,000 users), all of the  
thousands/millions of accesses to a page not only do not see this  
compression delay but also receive the benefits of less CPU and I/O to  
produce the javascript package on the server, and a smaller payload  
which provides improved performance on the wire and quicker parsing on  
the browser side.

A previous poster, however, tried to make a claim that "I turned off  
compression and now EVERY page load is slightly faster".  This is  
impossible if correctly using javascript compression.  I just didn't  
want this statement living by itself in the mail archives, lest  
someone do an incomplete search and think that turning off javascript  
compression is a good thing (if using statically cached javascript --  
and everybody really SHOULD be -- javascript and CSS compression  
should always be used).

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the horde mailing list