DescriptionDo not cause unnecessary node lists invalidation on id/name attribute change
Do not cause unnecessary node lists invalidation on id/name attribute change.
Invalidation now occurs only if there are node lists with a *valid* id / name
cache.
I see a 12% speed up on Dromaeo's dom-attr test. This patch should fix the
performance regression by r166263, which made getElementsByTagName() return an
HTMLCollection instead of a NodeList. According to the profiler, the
performance impact is mainly due to node lists cache invalidation. This is
because HTMLCollection has an id / name cache, while NodeList doesn't.
This CL also improves the id / name cache API naming on HTMLCollection for
clarity.
R=abarth, adamk
BUG=340325
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167115
Patch Set 1 #Patch Set 2 : Invalidate id/name cache in HTMLCollection destructor #Patch Set 3 : Handle move between documents properly #Patch Set 4 : Code clean up #
Total comments: 6
Patch Set 5 : Rebase #
Total comments: 5
Patch Set 6 : Rebase #Patch Set 7 : Rebase #Patch Set 8 : Rebase #Patch Set 9 : Rebase #Patch Set 10 : Rebase #
Messages
Total messages: 17 (0 generated)
|