4 ms·
record the timing in MS for the update and draw stages of every frame This tells you nothing about when the frame actually makes it to the screen. It's ok for
by rockdoe 12y ago
record the timing in MS for the update and draw stages of every frame
This tells you nothing about when the frame actually makes it to the screen. It's ok for optimizing your own code, not so useful for comparing across devices, platforms & browsers.
- kevingadd 12y agoFrame scheduling delay doesn't matter for performance benchmarking. Modern browser compositors literally grab the frame you hand them and display it at next vsync. It's irrelevant. Note that a browser can also run rAF ticks at 60hz even if it's dropping half your frames to hit 30hz vsync. You won't be able to tell. It is the case that some browser compositors fuck up the presentation of frames (hi Chrome), and that sucks, but you can't programmatically detect it.