Bug 118555
Summary: | Do not update compositing layers when the style is forced from JavaScript | ||
---|---|---|---|
Product: | WebKit | Reporter: | Alexandru Chiculita <achicu> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | simon.fraser, thorton |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Alexandru Chiculita
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexandru Chiculita
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)
Yep, aware of this. We have another bug:84393
*** This bug has been marked as a duplicate of bug 84393 ***