Bug 90695 - Performance: 2D Canvas rendering spending a lot of CPU time in RenderLayerCompositor::updateLayerCompositingState
Summary: Performance: 2D Canvas rendering spending a lot of CPU time in RenderLayerCom...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-06 10:14 PDT by Justin Novosad
Modified: 2012-07-06 11:08 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Novosad 2012-07-06 10:14:00 PDT
While profiling Chrome, executing the benchmark page found here:
https://github.com/sibblingz/PerfMarks

A hot spot was detected detected in RenderLayerCompositor::updateLayerCompositingState (mostly in updateGraphicsLayerConfiguration()), which appears to be called once for every 2D canvas primitive draw.
For some of the sub tests of this benchmark, as much as 20% of CPU time can be spent in that function.  Since canvas draws do not impact the layout of composited layers, there should be no need to visit this code so often.

Related bug: https://bugs.webkit.org/show_bug.cgi?id=90630
Comment 1 Justin Novosad 2012-07-06 11:08:06 PDT
fixed by r121987: <http://trac.webkit.org/changeset/121987>

The call to RenderLayerCompositor::updateLayerCompositingState is now bypassed when contentChanged() is called with CanvasPixelsChanged rather than CanvasChanged.