Hi. I'm building a highly dynamic application based using jQuery extensively. I have a set of templates with predefined markup, which is retrieved and modified using jQuery CSS queries. However, as the markup size increases the queries are becoming considerably slow. I've tested some different ways of rewriting my queries (retrieving the elements by id, searching by name or any other attribute under a specific context, getting a parent element and traversing the DOM using operations like children(), etc.) but I haven't discovered a best practice so I can improve the performance consistently.
 
I also tried to use XPath queries, but they actually didn't work (even the simplest ones) and I think they're built as CSS queries anyway.
 
Can anybody point me in the right direction to write performant code with jQuery? I know it depends on my markup and other factors, but I wonder if there's a set of best practices in order to get the most of the library.
 
Thanks,
 
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to