[Javascript] performance. WAS:external scripts

Mike Dougherty mdougherty at pbp.com
Tue Jun 22 22:42:36 CDT 2004


   My boss asked the same question, assumed the answer, and told me not to spend any more time on 
compressing the scripts.  I have no idea what impact it would have.  Many compressor 
implementations also obfuscate the code in hopes that it will be more difficult for someone to 
swipe and reuse.  Personally I feel that's just being anti-social.  My guess is that modem-level 
compression is bitwise along a data stream, rather than character-based over the entire document. 
 Any trimming you can do at the document level will remove fat before it even gets to the 
bitstream.  

   I also considered separate modules vs monolithic file for the sake of the number of requests 
between the client/browser and the server :  many files =?= more (possibly) concurrent streams on 
a narrow pipe, more read requests to a potentially busy server vs. monolithic file =?= single 
request to the server.  I appreciate the idea that the browser cache update of a smaller file 
would happen more quickly/easily than if one of the modules inside the monolithic file changed. 
 I'm not sure how the browser determines if the cache needs to be updated, or what (or how) 
resources are used to execute the download of external scripts.

   Currently we need the project coordinators to figure out some marketing issues and get more 
people to the site, so we have more traffic to analyze.  Until then we're mainly just speculating.

On Tue, 22 Jun 2004 16:15:58 -0300
  "allard schripsema" <allard-schripsema at procergs.rs.gov.br> wrote:
>Hello All
>Sorry about reacting this late to this thread, but something is bugging me
>with this "Crunchinator" ....
>Why would one want to crunch code for performance if the code is compressed
>by the modem (v42 for example)?
>
>I´m working on the performance in the project I work for, so i´d like to
>know if "crunching" really has an effect, not in bytes, but in seconds.....



More information about the Javascript mailing list