2

What is threaded compositing?

It was referred to in a recent Paul Irish Post as a means to produce iOS-like scrolling:

I searched chrome about:flags but wasn't able to find what Paul was referring to. I assume it has something to do with how elements are rendered but I'm interested in if/how compositing can be tackled programmatically (in JavaScript?).

user229044
  • 232,980
  • 40
  • 330
  • 338
tim peterson
  • 23,653
  • 59
  • 177
  • 299

2 Answers2

2

Tested this flag on this page, still scrolling freezes http://romaxa.info/tests/scrolltest/layout3_busy_long.html

Works good on XUL firefox (Mobile version with multiprocess layers)

romaxa
  • 21
  • 2
1

At this point, threaded compositing is an experimental feature, and thus is only available in the dev or canary channel. If you'd like to try this feature out, you can download a Chrome build in the dev or canary channel.

About the feature itself, it is described as follows on chrome://flags/:

Uses a secondary thread to perform web page compositing. This allows smooth scrolling, even when the main thread is unresponsive.

avernet
  • 30,895
  • 44
  • 126
  • 163
  • @avarnet, so it sounds its a property of the browser. Can you give some general advice as to how javascript/css programmers can ensure that they don't get into secondary threads and make their main threads unresponsive? Are you just talking bad recursion/for loops? – tim peterson May 17 '12 at 20:55
  • @timpeterson My understanding is that this secondary thread is only used "internally" by Chrome; it won't run any of your JavaScript, so you don't have to worry about having multiple parts of your code running in multiple threads. – avernet May 18 '12 at 01:55
  • @avarnet, thanks that helps clarify, nobody wants to do more coding so that's great! – tim peterson May 18 '12 at 13:39