Hi ! Is there a solution to improve performances issues on $$ function under IE ? On load I try to do $$(''.test'') on a big HTML (120kb) page and it takes 5 seconds ! Is there hidden tips or clues to did it better ? If I specify a Tag like $$(''UL.test'') it is faster. Unfortunatly I can''t do that because I don''t know the tag using this class . Best Regards -- Jean-Philippe Encausse Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33 6 82 12 56 99 Jalios: +33 1 39 23 92 83 Tel: +33 1 39 18 90 15 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hey Jean-Phillipe, Jean-Philippe Encausse a écrit :> Is there a solution to improve performances issues on $$ function under IE ? > On load I try to do $$(''.test'') on a big HTML (120kb) page and it > takes 5 seconds !I will refrain from ranting over a 120KB page... :-) If your expression is that simple, prefer document.getElementsByClassName(''test''). It''s supposed to be way faster (uses either DOM 3 XPath if available, otherwise reverts to a className-specific lookup on all elements).> > Is there hidden tips or clues to did it better ?Yes: find an ergonomy model for your app that doesn''t yield 120KB pages :-) Of course, there will always be border cases. But does your page really have to be one of those? ''HTH -- Christophe Porteneuve aka TDD tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks, I gonna try getElementsByClassName() About 120Kb, I know ... It is a really big sample portal with many portlet so many XHTML ... In real life it should be lighter. On 10/25/06, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> > Hey Jean-Phillipe, > > Jean-Philippe Encausse a écrit : > > Is there a solution to improve performances issues on $$ function under IE ? > > On load I try to do $$(''.test'') on a big HTML (120kb) page and it > > takes 5 seconds ! > > I will refrain from ranting over a 120KB page... :-) > > If your expression is that simple, prefer > document.getElementsByClassName(''test''). It''s supposed to be way faster > (uses either DOM 3 XPath if available, otherwise reverts to a > className-specific lookup on all elements). > > > > Is there hidden tips or clues to did it better ? > > Yes: find an ergonomy model for your app that doesn''t yield 120KB pages > :-) Of course, there will always be border cases. But does your page > really have to be one of those? > > ''HTH > > -- > Christophe Porteneuve aka TDD > tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >-- Jean-Philippe Encausse - R&D Jalios SA Jp [at] encausse.net - http://www.encausse.com - http://www.jalias.com GTalk: jp.encausse [at] gmail.com - SMS: sms [at] jp.encausse.net Mob: +33 6 82 12 56 99 Jalios: +33 1 39 23 92 83 Tel: +33 1 39 18 90 15 Do it Once, Use it Twice ~ Do it Twice, Make It Once --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---