> Has any thought been given to a plugin or a modification to jquery > to cache the DOM objects resulting from queries for laster use?
The implementation is pretty straightforward, but the implications are tough to handle. You'd need to store both the incoming selector string (assume you don't have to cache incoming DOM references) and the context. Then you'd need some way to invalidate the cache; I don't think there's any workable way that jQuery can figure out whether its cache is valid or not. Judging from the code that is posted on the list, I think we could improve performance by encouraging people to use chaining and/or keep their own "cache" in a local or global variable when it's warranted and safe. _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
