Speed Improvements in SVN
Hi Everyone -
I've finished up the speed improvements and have committed them to
SVN. They work correctly against the test suite, so they seem to be
OK. There's still a lot of room for improvement. Speeds in IE are
better, but still not very good. However, in Firefox, we're totally
crushing everyone else. You can see the difference for yourself:
jQuery Old vs. jQuery New Speed Test Suite:
http://john.jquery.com/speed/
Test Suite:
http://john.jquery.com/test/test/
I also took this opportunity to fix a lot of bugs:
- .siblings() doesn't return the element itself, it returns
everything but (as it should)
- div #id and #id #oid now work correctly (contextual ID selection was broken)
- :nth-child(1) now selects the first child element - all nth-child
selectors were off by one
There's a lot of task-specific code in the selector engine now
(unfortunately), but this helps to increase the speed significantly.
(Especially for things like child selectors, class selectors and
descendant-ID selectors)
Let me know if you have any questions about the changes that I made (I
also tried to document the selector engine a little bit better, too)
Have a happy holiday!
--John