henry.christopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Jun-18 04:58 UTC
DOM traversal functions performance
Hello List, Has anyone had difficulties with the performance of Prototype''s DOM traversal functions (Element#up, Element#down, etc.)? I''m building out a rather complex application with Ext and Prototype 1.6.0. When setting everything up, I will occasionally have to instantiate a few hundred objects, and each one uses Element#up. When there were a lot of objects, this operation could take as long as 10 seconds in iE7. I''ve since refactored, but are there any performance improvements in the works for these functions? Chris Henry --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
#up should be fast when called without arguments, as it simply returns an extended parentNode. When given "index", it actually collects all ancestors first, so that should indeed be slow in a complex document. There''s also an unnecessary element extension (which slows down IE even more). Thanks, we''ll look into it. - kangax On Jun 18, 12:58 am, "henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <henry.christop...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello List, > > Has anyone had difficulties with the performance of Prototype''s DOM > traversal functions (Element#up, Element#down, etc.)? > > I''m building out a rather complex application with Ext and Prototype > 1.6.0. When setting everything up, I will occasionally have to > instantiate a few hundred objects, and each one uses Element#up. When > there were a lot of objects, this operation could take as long as 10 > seconds in iE7. I''ve since refactored, but are there any performance > improvements in the works for these functions? > > Chris Henry--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---