RESOLVED DUPLICATE of bug 84393 118555
Do not update compositing layers when the style is forced from JavaScript
https://bugs.webkit.org/show_bug.cgi?id=118555
Summary Do not update compositing layers when the style is forced from JavaScript
Alexandru Chiculita
Reported 2013-07-11 02:12:20 PDT
Some websites trigger many relayouts from JS. Each time the layout is triggered, Document::recalcStyle will call view()->updateCompositingLayersAfterStyleChange(). That happens even if we are only going to repaint only once when the JS execution is finished. However, there's no need to update the composited layers to answer questions from JS, so we could postpone it until the very last moment and compute the layers only once.
Attachments
Alexandru Chiculita
Comment 1 2013-07-11 02:17:06 PDT
The issue is visible on http://www.milwaukeepolicenews.com . Scrolling is really bad because the JavaScript listens for scroll events and updates the layout every single frame. There are at least 10-15 style updates for each frame and each update will recalculate the compositing requirements of the layers. RenderLayerCompositor::updateCompositingLayers takes 96% of the total time while scrolling the document.
Simon Fraser (smfr)
Comment 2 2013-07-11 11:12:56 PDT
Yep, aware of this. We have another bug:84393 *** This bug has been marked as a duplicate of bug 84393 ***
Note You need to log in before you can comment on or make changes to this bug.