Bug 118555 - Do not update compositing layers when the style is forced from JavaScript
Summary: Do not update compositing layers when the style is forced from JavaScript
Status: RESOLVED DUPLICATE of bug 84393
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-11 02:12 PDT by Alexandru Chiculita
Modified: 2013-07-11 11:12 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Chiculita 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.
Comment 1 Alexandru Chiculita 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.
Comment 2 Simon Fraser (smfr) 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 ***