-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voyeur performance issue #3
Comments
Yeah, read my comments on the issue and see the jsperf. Voyeur was defining things every time it touched a node. It was also not doing any caching of the filtered lists. Resolving both problems put the performance within reasonable margin of jQuery and better than Dojo. Further improvements could be made, but probably won't as i don't believe they are worth it. I explain that in the comments. |
@nbubna Where are the comments you refer to, I've not been able to find them. Link please. |
It's link at the end of the issue description above: adriancooney#20 Specifically: adriancooney#20 (comment) |
@nbubna Thanks, got it. FYI the jsperf has an error:
and the HTML test displays 'ERROR'. |
Argh. Something in the page is using AMD, so the "all" version was failing when alter.js started looking for window.HTML. Universal module definition is a pain for a modular build. I'll have to rethink that... |
Here's a fixed version. http://jsperf.com/voyeur8000/11 This one is actually a better profile of HTML's performance, despite the slower result than before, because the latest version does peek into kids of the first element. So selecting an element with children is slightly slower than one without kids. |
Thanks for the fix. |
I see the performance, and it's interesting to see that vanilla.js wins on performance. Offsetting some of the searching by using getElementsByClassName is VERY fast. |
@nbubna Thanks for forking voyeur.js. I'm curious to know whether you have done anything about the Voyeur performance issue.
The text was updated successfully, but these errors were encountered: