logo       

engine.js compression (cont): msg#00212

java.dwr.user

Subject: engine.js compression (cont)

Basically we're at the stage of our project where we're optimizing all the
pages for download sizes and speed. I posted a little while ago a bug I
found when enabling the compression feature of DWR and after playing with it
some more, I think a different approach should be made.

Firstly, I think compression should be the default. Not many people are
going to reading the engine.js contents anyway.

Secondly, compression should not be a run-time procedure. There should be
two versions of the engine.js file in the distribution and the servlet can
pick which one to use based on that parameter. This avoids any need to
parse + compress the js file on every request. There is also no need for
different levels of compression.

Lastly, I suggest using the Dojo Compressor (custom-rhino.jar) to do the
compression.

I extracted the engine.js file from RC2 and compressed it using the Dojo
Compressor and it gave me about 46% compression (from 43k to 23k - I had to
modify one line slight to get it to compile properly).

This 20k reduction in the script size makes a huge difference.

What do you guys think?


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise