highResDom Timestamp doesn't match up with performance tab?
Reported by
jase.wil...@gmail.com,
Feb 10 2018
|
||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Steps to reproduce the problem: 1. Navigate to https://codepen.io/jayflux/full/Zreavd 2. Open up Dev Tools, performance, hit the refresh button 3. Check the timestamps printed out against the performance chart What is the expected behavior? What went wrong? There's a few questions here for me... Should the amount of times the timeStamp is printed match up with the performance tab? Aren't they both based on performance.now()? Also is there any documentation, or reason why the requestAnimationFrame starts at that particular point for each frame? The handler clearly fires more times (in the console screenshot) than i shown in the performance tab, whats the reason behind this? In the performance screenshot, ive put an arrow to show where the handler fired (according to the console.log screenshot) but there's nothing there. Did this work before? N/A Chrome version: 64.0.3282.140 Channel: stable OS Version: 10.0 Flash Version:
,
Feb 12 2018
Zero time in the perf panel is when the trace is started. HR Time 0 is when the browsing context of the page is created. There's not really a guarantee that we can have those two line up. Hope that helps dude.
,
Feb 12 2018
@paul it sure does, are you able to explain (or link me to any docs) which explain why raf triggers at that point within a frame? Thanks Jason
,
Feb 15 2018
The time provided in the rAF callback is the beginning of the frame. Which means if there are a few rAF callbacks firing next to eachother, they will have the exact same timestamp. (see the screenshot. note the repeat-count numbers). This usually makes sense to no one so they just grab performance.now() at the start of rAF. Which is fine. :) Also maybe this is helpful: https://medium.com/@paul_irish/requestanimationframe-scheduling-for-nerds-9c57f7438ef4 |
||
►
Sign in to add a comment |
||
Comment 1 by krajshree@chromium.org
, Feb 11 2018