We currently do scope analysis for stylesheets that are added to the end of the active stylesheet list to avoid unnecessary style recalcs and StyleResolver rebuilding. However it is somewhat common to insert <style> elements dynamically to positions other than last. In this case we currently simply force full style recalc. We should do scope analysis and partial style recalcs also in these cases.
Created attachment 165724 [details] patch with performance test
Comment on attachment 165724 [details] patch with performance test View in context: https://bugs.webkit.org/attachment.cgi?id=165724&action=review Neat! r=me > Source/WebCore/ChangeLog:12 > + PerformanceTests/CSS/StyleSheetInsert.html microbenchmark shows ~20x progression from the patch. Glorious exposition, comrade!
<rdar://problem/12376415>
http://trac.webkit.org/changeset/129644
Is it really worth running this test on every check in? FWIW, we already have a bot cycle time of one hour. Also, it seems like we could have used PerfTestRunner.runPerSecond here.
(In reply to comment #5) > Is it really worth running this test on every check in? FWIW, we already have a bot cycle time of one hour. Also, it seems like we could have used PerfTestRunner.runPerSecond here. We run our correctness regression tests on every check-in. Why wouldn't we run performance regressions tests like that too? It is a pretty fast test and could be made faster too. I didn't know about PerfTestRunner.runPerSecond.
(In reply to comment #6) > We run our correctness regression tests on every check-in. Why wouldn't we run performance regressions tests like that too? > > It is a pretty fast test and could be made faster too. I didn't know about PerfTestRunner.runPerSecond. The problem is that performance tests are much, much slower, and we can't parallelize them. Our current bot cycle is 50-60 minutes after disabling one test that was running out of memory on Chromium. And every new test will increase the run time by anywhere from 5 seconds to 5 minutes...