Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why "Composite Layers" takes so much time?

I'm profiling list with infinite scrolling and data lazy-loading. What can cause this long "Composite Layers" phase?

Screenshot1

and

Screensho2

If you are interested in details about the list:

  • The list has limited number of physical row elements and uses "transform: translate3d(...)" to reorder them when scrolling.
  • Chrome paints each row in separate layer.
  • There are just up to 25 layers in entire browser page.
like image 920
Taras Hupalo Avatar asked Jul 14 '15 17:07

Taras Hupalo


People also ask

What are composite layers?

Layers that contain one or more objects with a defined "Composite Level" greater than zero are considered composite layers. Composite levels make it easy to define the fill rules for objects without the construction of complex polygons or geometries.

What is composite layer in CSS?

Compositing and Blending is a CSS module that defines how shapes of different elements are combined into a single image.


1 Answers

Without a link, it's hard to say for sure - but by the look of all the "purple" (in your first screenshot), you are likely using too many elements that contain any of the below properties:

A) have position: fixed;

B) are using transform before and during animations

C) using too many simultaneous keyframes (for example as you append rows while lazy loading)

Edit: Upgrade your version of Chrome - Performance replaces Timeline and provides a little more insight on the details you might be looking for.

like image 96
Jimmy Amash Avatar answered Oct 19 '22 21:10

Jimmy Amash