<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/9.9.9" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Javascript compressor</title>
	<link>http://www.panoramio.com/blog/javascript-compressor/</link>
	<description>Development of Panoramio, a mash-up of Google Maps and geopositioned photos</description>
	<pubDate>Sun, 06 Jul 2008 20:35:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=9.9.9</generator>

	<item>
		<title>by: Joaquín Cuenca Abela</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-727</link>
		<pubDate>Mon, 18 Dec 2006 14:16:48 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-727</guid>
					<description>Hi Philipp,

yes, it's pretty good. Let's say I had more fun building mine :-)
As per the gzip suggestion, problem is if you gzip your javascript IE (at least up to version 6, don't know about version 7) will not be able to use it. Sometimes it works, sometimes it's not able to execute the javascript, and sometimes it even crashes.

So if even if you gzip your javascript, that will be of no use to the most part of your users.</description>
		<content:encoded><![CDATA[<p>Hi Philipp,</p>
<p>yes, it&#8217;s pretty good. Let&#8217;s say I had more fun building mine <img src='http://www.panoramio.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
As per the gzip suggestion, problem is if you gzip your javascript IE (at least up to version 6, don&#8217;t know about version 7) will not be able to use it. Sometimes it works, sometimes it&#8217;s not able to execute the javascript, and sometimes it even crashes.</p>
<p>So if even if you gzip your javascript, that will be of no use to the most part of your users.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Philipp Jardas</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-725</link>
		<pubDate>Mon, 18 Dec 2006 13:39:25 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-725</guid>
					<description>Did you try the Dojo compressor? http://dojotoolkit.org/docs/compressor_system.html - it's based on the Rhino engine. From a pragmatic point of view, I have to agree with Johan: gzip is the ultimate solution to the JavaScript size problem.

JavaScript library in a rather big project (using prototype and scriptaculous):
original script file: 369 K
compressed with gzip -9: 83 K</description>
		<content:encoded><![CDATA[<p>Did you try the Dojo compressor? <a href="http://dojotoolkit.org/docs/compressor_system.html" rel="nofollow">http://dojotoolkit.org/docs/compressor_system.html</a> - it&#8217;s based on the Rhino engine. From a pragmatic point of view, I have to agree with Johan: gzip is the ultimate solution to the JavaScript size problem.</p>
<p>JavaScript library in a rather big project (using prototype and scriptaculous):<br />
original script file: 369 K<br />
compressed with gzip -9: 83 K
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mike</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-180</link>
		<pubDate>Fri, 14 Apr 2006 02:01:58 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-180</guid>
					<description>JavaScript Tools find at http://www.yaodownload.com/web-authoring/javascript/, it contains the hot tools.</description>
		<content:encoded><![CDATA[<p>JavaScript Tools find at <a href="http://www.yaodownload.com/web-authoring/javascript/," rel="nofollow">http://www.yaodownload.com/web-authoring/javascript/,</a> it contains the hot tools.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Panoramio &#187; Blog Archive &#187; It can&#8217;t be so hard&#8230;</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-148</link>
		<pubDate>Sat, 14 Jan 2006 09:05:47 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-148</guid>
					<description>[...] Do you remember my last post about my javascript compressor? [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Do you remember my last post about my javascript compressor? [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Johan Sundström</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-125</link>
		<pubDate>Tue, 27 Dec 2005 20:47:22 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-125</guid>
					<description>Oh, lookie; there &lt;i&gt;is&lt;/i&gt; a comments feed; hooray! :-D *subscribes*

(I sloppily missed it earlier as there was no autodetect code in place for it.)

I've been poring through and tweaking the Google Maps code numerous times too, but it has always been a high time cost endeavour, at least on the levels I have been digging; the widget creation code, event, image+transparency and maptile handling subsystems to name a few places where very little publically named method, and most of all, parameter names, are strewn about. It's just as painful every time. I probably would not be as passionate about this if I had not been through any of that.

But you are right about your tools in development being interesting from a higher level of development perspective; there are lots of things they could do that presently available javascript creation supporting toolkits do not offer.</description>
		<content:encoded><![CDATA[<p>Oh, lookie; there <i>is</i> a comments feed; hooray! <img src='http://www.panoramio.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  *subscribes*</p>
<p>(I sloppily missed it earlier as there was no autodetect code in place for it.)</p>
<p>I&#8217;ve been poring through and tweaking the Google Maps code numerous times too, but it has always been a high time cost endeavour, at least on the levels I have been digging; the widget creation code, event, image+transparency and maptile handling subsystems to name a few places where very little publically named method, and most of all, parameter names, are strewn about. It&#8217;s just as painful every time. I probably would not be as passionate about this if I had not been through any of that.</p>
<p>But you are right about your tools in development being interesting from a higher level of development perspective; there are lots of things they could do that presently available javascript creation supporting toolkits do not offer.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Joaquín Cuenca Abela</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-117</link>
		<pubDate>Tue, 29 Nov 2005 09:51:54 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-117</guid>
					<description>Hi Johan,

Nope, I guess you are not the only one that think it :-)

But I do not think removing extra stuff in javascript changes substantially the openness of the web. You are already entitled to follow the copyright of javascript code, and there are a lot of pretty printers for javascript out there. In fact, I will put a pretty printer along the compressor.

Sure it will not bring back comments and renamed names, but it is more than enough to make javascript code understandable. For instance, I regularly read / modify google maps code without even running it through a prettifier.

As you said, compressing javascript code with mod_deflate wins over removing extra stuff hands down. But these are cumulative wins. Wether you should do the "removing extra stuff" pass depends on your particular situation. And to some people the slight obfuscation provided by this pass is a feature instead of a bug.

The thing is that I am mostly interested in the "extra size optimizations" I hinted above, in point 5. I am using prototype.js and script.aculo.us, and these libraries are huge. I want for my tool to remove unused parts of these libraries, and collapse all the used files on a single one. That is why I went all the way to write my own parser.

Currently downloading 4 or 5 javascript files at the same time stress a bit navigators, and I want the front page to show as fast as possible.

I know there is a balance to keep here. Having javascript splitted in several files helps if the base ones are cached among the whole website. However I hope the end result to be so tiny for total time to be dominated by the number of files, but I will certainly have to measure it.

Last, and I should confess that was the main point to start the parser, it looks like a cool project with some potential. I may grow it to a full javascript engine, and coupled with a html parser it may be a nice tool to debug some javascript problems that are not easy to debug with today tools, as memory leaks in some browsers, or warnings when you use features that will not run on old browsers, and so on.

Btw, I have already fixed the parsing of the regular expressions with the hack I outlined above, and this morning I had an idea to insert virtual semicolons as needed, let's see if it works...

Thank you for your comments Johan!

Cheers,</description>
		<content:encoded><![CDATA[<p>Hi Johan,</p>
<p>Nope, I guess you are not the only one that think it <img src='http://www.panoramio.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>But I do not think removing extra stuff in javascript changes substantially the openness of the web. You are already entitled to follow the copyright of javascript code, and there are a lot of pretty printers for javascript out there. In fact, I will put a pretty printer along the compressor.</p>
<p>Sure it will not bring back comments and renamed names, but it is more than enough to make javascript code understandable. For instance, I regularly read / modify google maps code without even running it through a prettifier.</p>
<p>As you said, compressing javascript code with mod_deflate wins over removing extra stuff hands down. But these are cumulative wins. Wether you should do the &#8220;removing extra stuff&#8221; pass depends on your particular situation. And to some people the slight obfuscation provided by this pass is a feature instead of a bug.</p>
<p>The thing is that I am mostly interested in the &#8220;extra size optimizations&#8221; I hinted above, in point 5. I am using prototype.js and script.aculo.us, and these libraries are huge. I want for my tool to remove unused parts of these libraries, and collapse all the used files on a single one. That is why I went all the way to write my own parser.</p>
<p>Currently downloading 4 or 5 javascript files at the same time stress a bit navigators, and I want the front page to show as fast as possible.</p>
<p>I know there is a balance to keep here. Having javascript splitted in several files helps if the base ones are cached among the whole website. However I hope the end result to be so tiny for total time to be dominated by the number of files, but I will certainly have to measure it.</p>
<p>Last, and I should confess that was the main point to start the parser, it looks like a cool project with some potential. I may grow it to a full javascript engine, and coupled with a html parser it may be a nice tool to debug some javascript problems that are not easy to debug with today tools, as memory leaks in some browsers, or warnings when you use features that will not run on old browsers, and so on.</p>
<p>Btw, I have already fixed the parsing of the regular expressions with the hack I outlined above, and this morning I had an idea to insert virtual semicolons as needed, let&#8217;s see if it works&#8230;</p>
<p>Thank you for your comments Johan!</p>
<p>Cheers,
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Johan Sundström</title>
		<link>http://www.panoramio.com/blog/javascript-compressor/#comment-116</link>
		<pubDate>Tue, 29 Nov 2005 04:58:12 +0000</pubDate>
		<guid>http://www.panoramio.com/blog/javascript-compressor/#comment-116</guid>
					<description>Am I the only one around who thinks option &lt;b&gt;2&lt;/b&gt; is the &lt;i&gt;only&lt;/i&gt; good choice of the above? Options 3 onward don't primarily address the speed problem, they put an end to the openness and reusability feature that makes the web such a good place to be in and part of in the first place.

Have you measured gains (okay, drops) in page weight, using both techniques? Just starting out with some &lt;a href="http://ecmanaut.blogspot.com/2005/03/profiling-javascript-with-venkman.html" rel="nofollow"&gt;imperfect sluggish hack&lt;/a&gt; such as the &lt;a href="http://www.brainjar.com/js/crunch/demo.html" rel="nofollow"&gt;BrainJar crunchinator&lt;/a&gt; (which does not treat regexps, or even comments, very well) and comparing the results with what gzip -9 does to the same page? Last time I tried, gzip won by a margin.</description>
		<content:encoded><![CDATA[<p>Am I the only one around who thinks option <b>2</b> is the <i>only</i> good choice of the above? Options 3 onward don&#8217;t primarily address the speed problem, they put an end to the openness and reusability feature that makes the web such a good place to be in and part of in the first place.</p>
<p>Have you measured gains (okay, drops) in page weight, using both techniques? Just starting out with some <a href="http://ecmanaut.blogspot.com/2005/03/profiling-javascript-with-venkman.html" rel="nofollow">imperfect sluggish hack</a> such as the <a href="http://www.brainjar.com/js/crunch/demo.html" rel="nofollow">BrainJar crunchinator</a> (which does not treat regexps, or even comments, very well) and comparing the results with what gzip -9 does to the same page? Last time I tried, gzip won by a margin.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
