title: What's causing this excessive "Composite Layers", "Recalculate Style" and "Update Layer Tree" cycle?
body: <p>I am very intrigued by the excessive number of "composite layers", "recalculate style" and then "update layer tree" events in one of our webapps. I'm wondering what's causing them here. </p>
  
  <p>If you point your Chrome to one of our fast moving streams, say <a href="https://choir.io/player/beachmonks/github">https://choir.io/player/beachmonks/github</a>, and turn on your "FPS meter", you can see that the app can achieve about 60fps most of the times when we are on the top.</p>
  
  <p>However, as soon as I scroll down a few messages and leave the screen as it is, the FPS rate drops dramatically down to around 10 or even lower. What the code is doing here is that it renders each incoming message, prepends it to the top and scroll the list up Npx, which is the height of the new message, to keep the viewport position intact. </p>
  
  <p>(I understand that scrollTop will invalidate the screen but I have carefully ordered the operations to avoid layout thrashings. I am also aware of the synchronous repaint that happens every second, it's caused by the jquery.sparkline but it's not relevant to this discussion.) </p>
  
  <p>Here is what I see when I tried to profile it. 
  <img src="https://i.stack.imgur.com/R8lbk.png" alt="low fps profiling result">. </p>
  
  <p>What do you think might be causing the large number of layer operations?</p>