On Dec 19, 2006, at 12:51 PM, Dave Methvin wrote: >> The first thing my code does is test how long it takes to run a >> $(".class") query, and bases the number of attempts for each >> test on the speed of that query (not a perfect system, but it >> should prevent crazy long loads on slow computers. >> Check the test out at: >> http://yehuda.jquery.com/jq_test.html > > Nice!
I agree. Good work, Yehuda! > Karl and Aaron, too, thanks for starting this test framework. I wonder > about how sensitive the timings are to the structure of the > document. This > one has an id on almost every element, which is not typical. > Perhaps that is > making ids look slower. Very good point. Before I threw the test page up there, I raised the same issue (rather, I recalled that the issue had been raised on the list before) about the times varying depending on page complexity. With that in mind, how about this for a more robust test page: 1. start with a simple 3-column layout, plus header and footer, and dump some lorem ipsum in for content. 2. have a form with a. text field for DOM querying, like I have on my current test page. b. textarea for additional markup, and an appendTo text field next to it. That way, you could drop in as many extra DOM elements as you want, wherever you want, and then test a query's speed. If people think this would work and would be useful, I'd be happy to build it. --Karl _________________ Karl Swedberg www.englishrules.com www.learningjquery.com _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/