> Don't use .down and .next with no arguments unless you need non-text
> nodes. It is very inefficient in this case. next grabs all nextSibling
> elements recursively (potentially many, extending each one in the
> process) and then just returns the first one. down grabs *all*
> descendants, then loops through extending each one, and then returns
> the first one.
>
> I suggest only using those methods if you need guarantees that you are
> getting a DOM element and not a text node. In this case I would argue
> that you *do* want text nodes. Consider:

You might want to check out the patch I submitted some days ago. It'll
optimize this (calling down/up etc without arguments):
http://dev.rubyonrails.org/ticket/7848

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to