<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Infrequently Noted &#187; acme</title>
	<atom:link href="http://infrequently.org/tag/acme/feed/" rel="self" type="application/rss+xml" />
	<link>http://infrequently.org</link>
	<description></description>
	<lastBuildDate>Fri, 18 Nov 2011 16:25:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Dojo Wins Mobile Slickspeed Shootout</title>
		<link>http://infrequently.org/2009/05/dojo-wins-mobile-slickspeed-shootout/</link>
		<comments>http://infrequently.org/2009/05/dojo-wins-mobile-slickspeed-shootout/#comments</comments>
		<pubDate>Thu, 14 May 2009 19:26:46 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[acme]]></category>
		<category><![CDATA[benchmark]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/2009/05/dojo-wins-mobile-slickspeed-shootout/</guid>
		<description><![CDATA[Stefan K. has posted a fascinating run-down of mobile browser performance with regards to JavaScript toolkits. No big shock, but Dojo once again brings home the bacon. I&#8217;d love to see these tests re-run with TaskSpeed instead of SlickSpeed, but when you&#8217;re doing progressive enhancement it turns out that selector engine performance really matters. Dojo [...]]]></description>
			<content:encoded><![CDATA[<p>Stefan K. has <a href="http://blog.stefankolb.de/2009/05/13/javascript-frameworks-within-mobile-widgets/">posted a fascinating run-down</a> of mobile browser performance with regards to JavaScript toolkits. No big shock, but Dojo once again brings home the bacon. I&#8217;d love to see these tests re-run with <a href="http://dante.dojotoolkit.org/taskspeed/">TaskSpeed</a> instead of SlickSpeed, but when you&#8217;re doing progressive enhancement it turns out that selector engine performance really matters. Dojo continues to do very well in both TaskSpeed and SlickSpeed because the <a href="http://alex.dojotoolkit.org/2009/03/dojo-13b3-is-out/">Acme selector engine</a> is so darned fast. In the real world, selector speed matters and the faster it gets, the more queries we seem to do.</p>
<p>I&#8217;m not entirely sold that the right solution going forward is to use the toolkits we already have, but if you&#8217;re building a mobile app today and you&#8217;re going to use a toolkit, it looks like (as on desktop browsers), Dojo should be your first choice. The <a href="http://alex.dojotoolkit.org/2009/01/webkit-mobile/">webkitMobile variant of Dojo points to one possible way out</a> of the &#8220;what to do about mobile?&#8221; conundrum regarding size and IE-induced bloat, but I have some hope that WebKit will improve quickly enough to make the toolkits of today obsolete on mobile phones entirely. Time will tell.</p>
<p><em>Hat tip: the <a href="http://blog.uxebu.com/2009/05/13/javascript-framworks-within-mobile-widgets/">Uxebu blog</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/05/dojo-wins-mobile-slickspeed-shootout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acme: Sometimes Being Generic Is A Win</title>
		<link>http://infrequently.org/2009/05/acme-sometimes-being-generic-is-a-win/</link>
		<comments>http://infrequently.org/2009/05/acme-sometimes-being-generic-is-a-win/#comments</comments>
		<pubDate>Wed, 06 May 2009 19:27:47 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[acme]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[selector]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/2009/05/acme-sometimes-being-generic-is-a-win/</guid>
		<description><![CDATA[Shane O&#8217;Sullivan, recently minted as as Dojo committer, has updated his GreaseMonkey script for skipping welcome screens to use Acme instead of Sizzle. Short story: fewer browser crashes and better performance. If you&#8217;re not using Dojo, now might be a good time to ask why your library isn&#8217;t using Acme too.]]></description>
			<content:encoded><![CDATA[<p>Shane O&#8217;Sullivan, recently minted as as Dojo committer, has <a href="http://shaneosullivan.wordpress.com/2009/05/02/using-dojoquery-greasemonkey-to-skip-welcome-screens/">updated his GreaseMonkey script for skipping welcome screens</a> to use Acme instead of Sizzle. Short story: fewer browser crashes and better performance.</p>
<p>If you&#8217;re not using Dojo, now might be a good time to ask why your library isn&#8217;t using <a href="http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/_base/query.js">Acme</a> too.</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/05/acme-sometimes-being-generic-is-a-win/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dojo 1.3b3 Is Out</title>
		<link>http://infrequently.org/2009/03/dojo-13b3-is-out/</link>
		<comments>http://infrequently.org/2009/03/dojo-13b3-is-out/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 01:29:47 +0000</pubDate>
		<dc:creator>alex</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[1.3]]></category>
		<category><![CDATA[acme]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[querySelectorAll]]></category>

		<guid isPermaLink="false">http://alex.dojotoolkit.org/?p=888</guid>
		<description><![CDATA[New Dojo hotness is about to land, and you can get your very own sneak-peek by grabbing one of the beta builds, or if you&#8217;re a DOM-and-progressive-enhancement-only kinda person, you can grab only dojo.js. So why should you be switching to Dojo or upgrading to 1.3? You can dig through the nearly 500 fixed bugs [...]]]></description>
			<content:encoded><![CDATA[<p>New Dojo hotness is about to land, and you can get your very own sneak-peek by grabbing one of the <a href="http://download.dojotoolkit.org/release-1.3.0b3/">beta builds</a>, or if you&#8217;re a DOM-and-progressive-enhancement-only kinda person, you can grab only <a href="http://download.dojotoolkit.org/release-1.3.0b3/dojo.js">dojo.js</a>.</p>
<p>So why should you be switching to Dojo or upgrading to 1.3? You can dig through the nearly <a href="http://bugs.dojotoolkit.org/query?status=closed&#038;group=resolution&#038;order=priority&#038;milestone=1.3&#038;resolution=fixed">500 fixed bugs</a> or the tentative <a href="https://www.dojotoolkit.org/node/8817">release notes</a> yourself, but broadly speaking, we&#8217;ve hit all of our major stated targets for 1.3: IE 8 compatibility, major performance improvements throughout the whole system, and enhancements that make the APIs you already know that much more powerful and useful. I don&#8217;t want to get into specifics since Pete&#8217;s release announcement will include much more detail, but I&#8217;ll outline some of the changes to just the CSS query engine since that&#8217;s the system I worked on most for this release (continued after the jump).</p>
<p><span id="more-888"></span></p>
<p>As you may know, Dojo&#8217;s CSS query engine has always been <a href="http://alex.dojotoolkit.org/2008/08/dojos-query-system-no-really-its-that-fast/">wicked fast</a>. Indeed, our original design target for doing CSS queries was that we wouldn&#8217;t do an engine until we could be sure that it would be <a href="http://dojotoolkit.org/2007/02/05/dojo-query-css-query-engine-dojo">so fast that using it wouldn&#8217;t slow down applications</a>. Release after release, the query engine in Dojo has continued to improve, consistently beating all the other major toolkits, particularly on queries that get a lot of heavy use by Dojo developers. The world is changing, though, and over the Christmas break, I spent some time upgrading <code>dojo.query</code> to take advantage of the changes in browser landscape. For 1.3, my goal was to remove the XPath branch from the system and re-enable QSA in a robust way. The motivators were:</p>
<ol>
<li><b>Firefox 3.0&#8242;s days are numbered.</b> Since the DOM branch has been used on WebKit-based browsers for some time (it has been shown to be faster than XPath over the HTML DOM in tests), and since <code>querySelectorAll</code> is becoming available on IE 8, FF <s>3.1</s> 3.5, and is now usable on WebKit browsers, the only customer for the XPath branch was FIrefox 3.0. With the imminent release of Firefox <s>3.1</s> 3.5, it stops making sense to cart around a second selector engine target for the query compiler. The win is that we get to keep the speed for selectors that can be run through QSA, and since we drop the XPath branch, the core is both smaller and we have more room in our &#8220;byte budget&#8221; to optimize the DOM branch further.</li>
<li><b><code>querySelectorAll</code> is nearly usable.</b> As has been <a href="http://ejohn.org/blog/thoughts-on-queryselectorall/">noted elsewhere</a>, <code>querySelectorAll</code> is good but fatally mis-designed for the rooted-query case. As a result of this and many, many, many QSA bugs on various browsers (yes you, IE <img src='http://infrequently.org/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> and gaps in CSS3 selector support, determining when to run a query via QSA and when to defer to the DOM branch isn&#8217;t actually straightforward. Engines like <a href="http://github.com/jeresig/sizzle/tree/master">Sizzle</a> try to detect query failure and re-run on DOM, but that leads to serious performance deficiencies on browsers with half-hearted QSA implementations. It&#8217;s also not accurate since silent errors are, well, silent. Enabling QSA, then, requires both a lot of work to handle rooted queries as well as feature and bug detection code to work around query engine differences.</li>
<li><b>Portability.</b> The new selector engine is affectionately named &#8220;Acme&#8221; (aka, &#8220;query.js&#8221;) to indicate how generic it is. The engine is 100% stand-alone and can be integrated into other toolkits without much work at all. This is made possible thanks to some build-system magic in Dojo which keeps us from duplicating any functionality and by careful and judicious use of Dojo Core features. <a href="http://download.dojotoolkit.org/release-1.3.0b3/dojo-release-1.3.0b3/dojo/_base/query.js"><code>query.js</code></a> can be <a href="http://download.dojotoolkit.org/release-1.3.0b3/dojo-release-1.3.0b3/dojo/tests/_base/queryPortability.html">used stand-alone</a> without any extra work.</li>
<li><b>Better infix operator handling could make things faster.</b> Instead of using regular expressions to parse CSS selectors, Dojo&#8217;s query engine generates an AST-like structure that represents a query. This system has always allowed us to have great visibility into what parts to optimize and how, but with 1.3 the AST generator now changes the way that infix operators (&#8220;>&#8221;, &#8220;~&#8221;, and &#8220;+&#8221;) are tokenized, making it possible to avoid inefficient queries which are then mostly thrown away and to skip error prone look-ahead code. This class of changes lead to huge speed wins.
</li>
</ol>
<p>I won&#8217;t cite specific performance numbers here since, as I&#8217;ve noted in the past, query engines are a commodity. That&#8217;s part of the reason we called the new engine &#8220;Acme&#8221;. Fast enough is fast enough, and the bottlenecks are elsewhere in toolkits today.  I&#8217;m proud that the new engine sets a high water mark for performance, and I encourage other query engine maintainers to look through <code>query.js</code> and adopt the approaches we&#8217;ve taken to achieve eye-popping aggregate performance across different browsers and types of queries. The code is clean and <a href="http://bugs.dojotoolkit.org/browser/dojo/trunk/_base/query.js#L89">commented to the hilt</a> with notes about overall design and specific implementation decisions. I&#8217;m also happy to answer questions that other engine authors have.</p>
<p>Acme is just one &#8211; and not nearly the biggest &#8211; reason that Dojo 1.3 is an outstanding release. I&#8217;ll post more about some of the things I&#8217;m most excited about when 1.3 final is announced, but until then, I again encourage you to <a href="http://download.dojotoolkit.org/release-1.3.0b3/">start working with the beta</a>. While you&#8217;re at it, you might also want to check out <a href="http://code.google.com/p/plugd/">plugd</a>, <a href="http://github.com/foobarfighter/drails/tree/v1.0.0">drails</a>, <a href="http://code.google.com/p/dojango/">Dojango</a>, and <a href="http://sitepen.com/labs/persevere.php">Persevere</a>. They&#8217;re making it easier and faster to build great apps with Dojo and might save you tons of time.</p>
<p>Pete, Bill, Dustin, Becky, Adam, Kris, James, Bryan, Sam, Nikolai, Wolfram, Neil, Dylan, Tom, Chris (and you too, Chris), Tobias, Shane, Cougar, Jared, Doug, Josh, Bob, Roberto, and the rest of the Dojo community have a lot to be proud of with 1.3. Nice work, everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://infrequently.org/2009/03/dojo-13b3-is-out/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

