New issue
Advanced search Search tips

Issue 835395 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

CA layer codepath slower with 500 layers

Project Member Reported by pdr@chromium.org, Apr 20 2018

Issue description

Chrome Version: 67.0.3393.4
OS: MacOs

What steps will reproduce the problem?
(1) Open the attached testcase and let the stars fall for a few seconds.
(2) Notice the performance is suboptimal
(3) Open inspector and check layer borders and notice performance improves.
 
transformSlowCa.html
3.3 KB View Download
The CA path does not handle large numbers of layers well. IIRC, it has to do with needing to write changes to a CATransaction, which has a fixed overhead per layer. We never came up with a solution to deal with this. I wonder if this is a fundamental CoreAnimation limitation, or if there are workarounds we're not aware of.
Components: -Blink>Compositing Internals>Compositing
Hmm, I added some counters to see how many layers we're updating, in particular
- content updates
- contents rect updates
- transform updates

Quick sample:
  Contents: 379, Rect: 413, Transform: 472
  Contents: 366, Rect: 412, Transform: 493
  Contents: 418, Rect: 447, Transform: 495
  Contents: 401, Rect: 435, Transform: 491
  Contents: 277, Rect: 349, Transform: 484
  Contents:  24, Rect: 150, Transform: 482
  Contents: 442, Rect: 479, Transform: 488
  Contents:   8, Rect: 114, Transform: 486
  Contents:   0, Rect: 111, Transform: 484
  Contents: 241, Rect: 316, Transform: 488
  Contents: 135, Rect: 202, Transform: 489
  Contents: 356, Rect: 380, Transform: 488
  Contents: 222, Rect: 287, Transform: 489
  Contents: 155, Rect: 225, Transform: 489
  Contents: 245, Rect: 296, Transform: 488

So we're failing to match the DOM layers to CALayers and we end up doing way more work than we should...
Not sure if it's useful, but I also see this effect on Google Docs (a single page document):
Screen Shot 2018-04-27 at 10.03.15 AM.png
191 KB View Download

Sign in to add a comment