You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by balachandra maddina <ch...@gmail.com> on 2009/07/09 20:34:16 UTC

Will the generated javascript be minified?

Hi There,

  When i was going through the examples i noticed that "control.js" and
"extras-control.js" being added to UI and i dont think this script is
minified. does this affect the performance in anyway? or its okay to have it
as it is?

Any help would be appreciated.

Thank you,
bala.

Re: Will the generated javascript be minified?

Posted by Bob Schellink <sa...@gmail.com>.
Hi Bala,

balachandra maddina wrote:
> Hi There,
> 
>   When i was going through the examples i noticed that "control.js" and 
> "extras-control.js" being added to UI and i dont think this script is 
> minified. does this affect the performance in anyway? or its okay to 
> have it as it is?


Click does not minify these scripts at runtime if thats what you mean. A 
minified script can save a bit of bandwidth though. For example running 
control.js through JSmin saves up to 40%. So control.js shrinks from 10kb to 6kb.

However if you use the PerformanceFilter, JavaScript and CSS files will be 
gzipped and a far future expiry header set so they are cached in the browser, 
and are only downloaded once.

To answer your original question is a bit hard because it depends on how much 
traffic the site will have. But for the average site I would say, yes it affects 
bandwidth but I don't think you need to worry about it, especially if Click is 
fronted with PerformanceFilter.

Btw I believe the bigger performance gain to be had is not in minifying the 
scripts but rather combining the scripts into one. Since browsers by default 
only make two connections at a time, the more resources to be downloaded the 
slower the site loads.

If you are not already using it I suggest you look at YSlow, its quite a useful 
tool to grade your site performance.

kind regards

bob