Alessandro, I thought that the compression function I once took from the ka-map mailing list was included in the javascript directory, but it seems I have once removed it. I added a slightly modified version on SVN, see
http://svn.pmapper.net/trac/browser/pmapper/trunk/util/compress_js It produces +/- the same size as you mentioned. I usually set gzip compression on the web server so I do not need to gzip the file. I you find any JS errors please tell me and I will check where some JS parts were not ready for the compression function. I mainly noticed very slow loading of single images via Ajax, even if very small, on IE. But it seems that the pre-loading I was trying (in start.phtml) does not help very much. I.e. the images are loaded again, anyway armin Alessandro Pasotti wrote: > Hi, > > I would like to share some thought about p.mapper loading times, I feel that > having many uncompressed js files push up loading times significantly due to > two main reasons: > > 1 - file size (188KB uncompressed) > 2 - number of requests > > Point 2 is browser dependant but AFAIK most browsers typically can handle no > more than 2 (IE) http requests simultaneously. > > I've come up with a solution that I'm using in many projects (mainly ajax) > and > tests in pmapper give good results. > > This is what I've done: > > # cd javascript > # for i in $(ls *.js); do mv $i $i.src; done > # for i in $(ls *.js.src); do jsjavacompress.sh $i >> pm.js ; done > > > This produces a single 95KB pm.js file that is loaded at startup. > additionally gzip gives a 27KB file. > > So we can go from 20 files 188KB to one file 27KB compressed and gzipped. > > # cat jsjavacompress.sh > java -jar custom_rhino.jar -c $1 2>&1 > > You can download custom_rhino.jar from here: > http://trac.dojotoolkit.org/browser/trunk/buildscripts/lib/custom_rhino.jar?rev=5877&format=raw > > There are many other js compression techniques, but I prefer this one as it > is > less error prone. > > The same could be done in jquery directory. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ pmapper-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pmapper-users
