Since the 7th click is reproducible, and has little to do with the issue, you can discard the value, with a simple note... years of stat classes!
conclusions: running thru the whole dom looking for a class is slow. looking for an ID (which should be unique) after getting the tags is worthless. looking for a class after getting a subset of the dom is faster than searching the whole dom. Safari is almost always faster than ff! Just what was expected! GREAT WORK! On 12/18/06, Karl Swedberg <[EMAIL PROTECTED]> wrote:
Hey everyone, I have results of a few more speed tests that I ran this evening at http://test.learningjquery.com/speed-test.htm Method: I clicked 10 times on each query in Firefox 2.0 and Safari 2.0.4(See HTML source for all code, markup, etc.) I recorded the mode (most common value) and the range of values for each, all in milliseconds. @ FF2 / Safari2 *1. $('#speech28') * - mode: 1 / 1 - range: 0-1 / 0-4 *2. $('div#speech28') * - mode: 43 / 32 - range: 42-59 / 30-35 *3. $('#final-speech div.final-dialog')* - mode: 5ms / 5ms - range: 4-6 / 3-6 *4. $('#final-speech .final-dialog')* - mode: 6 / 5 - range: 5-8 / 3-6 *5. $('div.final-dialog')* - mode: 55 / 40 - range: 28-253 / 40-45 *6. $('.final-dialog')* - mode: 101 / 51 - range: 83-306 / 51-68 *** Note that queries 5 and 6 have huge ranges in Firefox because of the mysterious seventh click issue. Looks like these tests confirm what we've all been saying on this list about the relative speed of various selectors. This has been a fascinating exercise. I'd love to hear people's analysis, etc. --Karl _______________________ Karl Swedberg www.englishrules.com www.learningjquery.com _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
-- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/