How measure Finish、DomContentLoaded and Load time from Navigation Timing?

2,095 views
Skip to first unread message

張君豪

unread,
Aug 7, 2017, 3:31:11 AM8/7/17
to Chromium-dev

Hello,

I'm use developer tool to measure page performance, and get the times(Finish、DOMContentLoaded and Load) on Network panel.
But I am not understand how to calculator the time from Navigation Timing?
If DOMContentLoaded and Load time is event execution time, domContentLoadedEventEnd-domContentLoadedEventStart=8, loadEventEnd-loadEventStart=6, it's not the same as the time of the Network panel. why?





PhistucK

unread,
Aug 7, 2017, 8:57:45 AM8/7/17
to 張君豪, Chromium-dev
This group discusses technical browser development issues, not web development.
This is off topic for this group, so continue this discussion either at net-dev or at google-chrome-developer-tools.

If you are talking about DOMContentLoaded: 282 ms and Load: 278 ms those times indicate the time it took from the time the page started to be rendered until the load or DOMContentLoaded events.
However, domContentLoadedEventEnd - domContentLoadedEventStart and loadEventEnd - loadEventStart indicate the time it took for the event listeners themselves to finish their work. Say, you added for (var i = 0; i < 99999999; i++) { console.log('1'); } to the load event listener and it took about a second to complete that execution, the result of loadEventEnd - loadEventStart would be around 1000.


PhistucK

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/c56fe916-de76-44b0-a37f-1b2663e7dc6b%40chromium.org.

PhistucK

unread,
Aug 7, 2017, 8:59:10 AM8/7/17
to 張君豪, Chromium-dev
One thing to note is that I find it very, very weird that DOMContentLoaded fired after load. Sounds very buggy, because I think DOMContentLoaded is a prerequisite for load, but perhaps I am just not familiar with the rules.


PhistucK

張君豪

unread,
Aug 7, 2017, 1:18:29 PM8/7/17
to Chromium-dev, jhangj...@gmail.com
Sorry. I see get Navigation Timing code from PerformanceTiming.cpp.
I'm not understand the calculator rule, so I want to find the calculator code.

PhistucK於 2017年8月7日星期一 UTC+8下午8時57分45秒寫道:


PhistucK

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Mohit Laad

unread,
Nov 6, 2018, 3:18:03 PM11/6/18
to Chromium-dev
Hi,

Were you able to find the formual for Finish time.

I have tried a couple of things but could not conclude on this. 
Reply all
Reply to author
Forward
0 new messages