WebPagetest Forums
Why more than 500ms time difference between DOM Content Loaded and Onload - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: Web Performance (/forumdisplay.php?fid=3)
+--- Forum: Discuss Test Results (/forumdisplay.php?fid=4)
+--- Thread: Why more than 500ms time difference between DOM Content Loaded and Onload (/showthread.php?tid=13945)

Pages: 1 2


Why more than 500ms time difference between DOM Content Loaded and Onload - kmoksha - 09-22-2015 08:37 PM

Hello,

Thanks for the nice testing tool and site.

I am testing using default settings and getting DOM Content Loaded load time of around 1s to 1.5s and getting OnLoad Time of 1.5 to 1.9s

I would like to know the following -

1. Why is there more than 500ms time difference between DOM Content Loaded and
OnLoad Time ?

2. Why is there so much final load time variation even though I am using the same test settings (default) ?


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - dfavor - 09-25-2015 08:40 AM

Post a link to your test results for more informed responses.


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - kmoksha - 09-25-2015 09:28 PM

(09-25-2015 08:40 AM)dfavor Wrote:  Post a link to your test results for more informed responses.

Thanks for responding.

Here is the link of the test results - http://www.webpagetest.org/result/150925_6A_N2W/


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - kmoksha - 09-27-2015 11:27 AM

No reply whatsover ? Is this forum active ?


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - pmeenan - 09-29-2015 01:34 AM

Your best bet to see what is happening during that time is to enable timeline capture in the chrome tab of the advanced settings which will capture a dev tools timeline.

My guess since there are no images or external resources is that the browser doesn't yield to do the layout/paint until between DCL and onload and it's that operation that is consuming the time (you can see the CPU is pegged between the two).


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - kmoksha - 09-30-2015 10:20 PM

(09-29-2015 01:34 AM)pmeenan Wrote:  Your best bet to see what is happening during that time is to enable timeline capture in the chrome tab of the advanced settings which will capture a dev tools timeline.

My guess since there are no images or external resources is that the browser doesn't yield to do the layout/paint until between DCL and onload and it's that operation that is consuming the time (you can see the CPU is pegged between the two).

Thanks Patrick for the reply.

I did enable the timeline capture. It is giving around 500 to 600 ms complete load time and DSL also same time. Other than that, I am not able to analyse.

Which browser / CPU does not yield to do the paint between DCL and onload ? The CPU and browser used by webpagetest.org ?


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - pmeenan - 09-30-2015 11:08 PM

Do you have a link to the test result with the timeline capture?

All browsers will behave differently. You can test Firefox or IE to see if either of them behave differently. The CPU just indicates that code is running doing something in the gap and the timeline would help you understand what it is.

Measuring the time without the browser yielding won't necessarily give you better data. The measurement might be faster but the page may also be blank. If you want the user to actually see content then you have to do layout and paint the screen.

If you want the actual measurement to be faster you can use the Dulles Thinkpad locating which has faster CPU so the processing will be shorter - but that doesn't really do anything but make the measurement faster for CPU-constrained operations.


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - kmoksha - 10-07-2015 12:36 AM

(09-30-2015 11:08 PM)pmeenan Wrote:  Do you have a link to the test result with the timeline capture?

All browsers will behave differently. You can test Firefox or IE to see if either of them behave differently. The CPU just indicates that code is running doing something in the gap and the timeline would help you understand what it is.

Measuring the time without the browser yielding won't necessarily give you better data. The measurement might be faster but the page may also be blank. If you want the user to actually see content then you have to do layout and paint the screen.

If you want the actual measurement to be faster you can use the Dulles Thinkpad locating which has faster CPU so the processing will be shorter - but that doesn't really do anything but make the measurement faster for CPU-constrained operations.

Patrick,

I do not know how to give link of the time line capture. I am posting here the screenshot of the same.

Testing with Dulles Think pad is also giving similar results - http://www.webpagetest.org/result/151006_MN_TBV/1/details/


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - pmeenan - 10-07-2015 12:49 AM

If you go to the chrome tab in the advanced settings there is a "capture devtools" checkbox. Here is a test example: http://www.webpagetest.org/result/151006_KJ_0689768376a937e07e38071c723a8646/

On the left of the waterfalls will be links to download or view the timeline.

It does look like it is the layout/paint (at least in the capture that I did) that is causing the delay between DCL and onload.

If you need to know exactly why it is taking so long to do the layout/paint then you will need to collect a trace (also in the chrome tab or in about:tracing locally) but you'll be deep in the guts of Chrome's internal code at that point.


RE: Why more than 500ms time difference between DOM Content Loaded and Onload - kmoksha - 10-10-2015 07:17 AM

(10-07-2015 12:49 AM)pmeenan Wrote:  If you go to the chrome tab in the advanced settings there is a "capture devtools" checkbox. Here is a test example: http://www.webpagetest.org/result/151006_KJ_0689768376a937e07e38071c723a8646/

On the left of the waterfalls will be links to download or view the timeline.

It does look like it is the layout/paint (at least in the capture that I did) that is causing the delay between DCL and onload.

If you need to know exactly why it is taking so long to do the layout/paint then you will need to collect a trace (also in the chrome tab or in about:tracing locally) but you'll be deep in the guts of Chrome's internal code at that point.

The capture option is enabled but I am not getting link how you are getting. And have no idea of how to collect a trace.

Can you please help in finding out what the reason fo the delay between DCL and onload time is. The results obtained with webpagetest have a huge variation in time even when done with the same settings. What could be the reason for that ?

Here is link of another test which I did - http://www.webpagetest.org/result/151009_5W_151Y/