i have analysed this further:
Element.ancestors call wasn't the problem.
The problem is that "Selector.findElement" is the first who finds out
that the first parameter is the index, and not an expression.
and this method allways uses "Selector.matchElements", which is slower
than using the fastpath defined in "Element.up" -> "ancestors[index ||
0]" which is only used if you write "$('element').up(false,1)"

adding this to the beginning of the Element.up method enables the
fastpath even with ".up(1)" calls:

    if (typeof expression == 'number') {
      index = expression; expression = false;
    }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to