Chromium Code Reviews
DescriptionWas benchmarking the differences between document.query and using the native DOM methods when available, and document.query is significantly worse in almost all scenarios.
Our current document.query can be optimized about 2x by caching the RegExps being used, but this is still not enough to get close to what they should be.
We special-cased a couple of queries to optimize those, but it appears that the browsers are optimizing those now as well and our optimizations are getting in the way, overall.
From my tests so far, this CL brings a speed improvement to document.query for all scenarios except for the name test:
document.queryAll('[name="test"]') which takes a fairly significant performance hit (runs close to 1/2 speed with this CL). This is mitigated by exposing getElementsByName which if used brings a 2x performance gain over queryAll.
BUG=
Committed: https://code.google.com/p/dart/source/detail?r=19831
Patch Set 1 : #
Messages
Total messages: 3 (0 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||