On May 24, 5:53 am, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > Andrew, it doesn't matter - getElementsByClassName tends to extend EVERY > node in the document! If that isn't slow I don't know what is.
No, it doesn't. It extends only those nodes that match the class name. I've personally spent quite a bit of energy to ensure that getElementsByClassName performs as well as possible under the circumstances, even in IE. To the author: nothing has changed about the behavior of getElementsByClassName since 1.5.0 final. It's *possibly* slower than it was in 1.4 final (because of the cost of extending each node with instance methods) -- but there have been some optimizations since 1.4, too. If it seems slower to you in the future, try doing a side-by-side comparison -- the Test.Unit framework packaged with the full source of Prototype makes it easy to run benchmarks. That way we can get some hard numbers. Cheers, Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---
