Chromium Code Reviews
DescriptionUse a dirty bit in StyleSheetCollection::updateActiveStyleSheets.
The loop in StyleEngine::updateActiveStyleSheets calls this
for every scope whenever any stylesheet is added or removed
from the document, ex. appending a new SkyElement with a
<style> in it. The method was crawling the scope and looking
for all sheets and then marking the element as needing a
SubtreeStyleRecalc, instead keep a dirty bit to avoid doing
a full document recalc all the time.
I made this slow previously when I removed all the dirty tree
scope tracking logic and made us go down the reconstruct path
in the resolver update all the time.
We now keep a dirty bit and only do this work when the sheets
for a scope have changed.
R=ojan@chromium.org
Committed: https://chromium.googlesource.com/external/mojo/+/1a2736821a99a68d65a9508d938a4967fe49ef40
Patch Set 1 #
Messages
Total messages: 4 (1 generated)
|
||||||||||||||||||||||||||||