Re: Web Smoothness

On Fri, Sep 19, 2014 at 2:31 PM, Nat Duca <nduca@chromium.org> wrote:

> Working backward up there, I think reporting things "per frame"  is a good
> abstraction. And, I think rAF is a great delimiter for a JS frame. Its not
> the real screen frame, but rather javascript's point of view on a frame.
> So, "time in layout since in the last JS frame."
>
> Except, I wonder if instead of us tackling layout right this second, we'd
> be better off starting with "how much total work was done in this frame"?
> E.g. across all our various pipeline stages, how much CPU time did we use?
> I think the process of figuring out that will push many of the same
> threading issues in a nice general way. If we get that figured out, maybe
> theres a v2 spec we can do to do stage-level timings.
>

Big +1 to this.

+ Keying off raF provides an easy to understand metric for developers.
+ Exposing "this is where we've spent time in the last frame" provides
visibility into all pipeline stages: layout, style-recalc, paint, JS
execution, etc.

E.g., effectively I'd love this this:
https://www.evernote.com/shard/s1/sh/b3c5d0bf-0051-4f12-ba15-9a339e9cc085/8c67aa0faef213f4b858fc92e9aa38ec

Last frame took 86 ms: 35ms were spent in scripting, 1.76ms in painting,
..., x ms in other.

ig

Received on Monday, 22 September 2014 19:29:36 UTC