DomQuery - A lightweight CSS Selector / Basic XPath implementation
Written by on January 12th, 2007 in Ajax News.
Jack Slocum is a machine. We had to add the new YUI-EXT category for him as he is coming up with such good material.
His latest, is an article on DomQuery - A lightweight CSS Selector / Basic XPath implementation.
Support for more complex schemas and document structures in the grid’s XMLDataModel class has been requested many times. Currently, you are limited to a schema which consists of only element level tag names and attributes. That is where DomQuery started. When loading a grid from an XML Document, there would be quite a few rapidly executing queries so great performance was imperative. Thanks to the FireBug Profiler, I was able to trace the bottlenecks and test different execution plans to see what was the fastest.
This library is nice and speedy. According to John Resig it is faster than Dean Edwards cssQuery. John wrote about this in response to the benchmark figures of jQuery that Jack shows:
We’ve been holding off on talking about the speed of the jQuery selectors for the new 1.1 release until our release was closer to being ready - however, it seems as if that process has already been expedited. So with that already out of the bag, lets look at the selector speeds of jQuery.
In short: For jQuery 1.1 we worked really really hard to make its selectors really fast. In fact, according to all our tests we were faster than any other selector library. Working on the 1.1 release, Dean Edwards’ cssQuery far out-performed any other selector library. It’s really comprehensive, and really fast.
Today, Jack Slocum announced his new DOMQuery selector library. In short: The bar has been raised. His library is very very fast. Quite possibly the fastest available today.
However, in the comparison between his library and ours, some mistakes were made that we’d like to clear up. (By both Jack and jQuery) (For reference, here’s the comparision suite that I used for my tests.)
Source: Ajaxian
Original Article: http://ajaxian.com/archives/domquery-a-lightweight-css-selector-basic-xpath-implementation
