WebPagetest Forums
Strange gap on repeat view between HTML & Analytics - 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: Strange gap on repeat view between HTML & Analytics (/showthread.php?tid=13988)



Strange gap on repeat view between HTML & Analytics - daanw - 10-12-2015 08:24 PM

Hi all,

I've got this strange test result where there is a huge gap/pause between the final bytes of the HTML and the Google Analytics script:

http://www.webpagetest.org/result/151012_NV_G3T/1/details/cached/

This also seems to influence the StartRender.

Does anyone have a clue to what could cause such a pause?

Thanks in advance!

Joyful regards,

Daan


RE: Strange gap on repeat view between HTML & Analytics - akshayranganath - 10-20-2015 07:08 AM

Could you post the link again? WPT link that you have shows no results.


RE: Strange gap on repeat view between HTML & Analytics - daanw - 10-20-2015 04:52 PM

Hi,

Thanks for noticing akshayranganath! Didn't know they could suddenly dissapear.

@pmeenan: Is there any way to cause / influence this?

Here is the new test result:

http://www.webpagetest.org/result/151020_VG_BDW/1/details/cached/

Looking forward to your insights.

Joyful regards,

Daan


RE: Strange gap on repeat view between HTML & Analytics - akshayranganath - 10-21-2015 11:34 PM

I looked at the waterfall and I can this see this CSS file being called from within the HTML.
https://www.insyde.nl/assets/fceaf56b/A.styles.css.pagespeed.cf.AFqer3Vm-B.css

This stylesheet is being called much later in the render process, after the other JS files and stylesheets have been downloaded, parsed and executed. When the new CSS is included, browser has to rebuild the CSSOM and it takes time.

Can you try to move this stylesheet to head and then check if the performance improves?


RE: Strange gap on repeat view between HTML & Analytics - daanw - 10-23-2015 06:44 PM

(10-21-2015 11:34 PM)akshayranganath Wrote:  I looked at the waterfall and I can this see this CSS file being called from within the HTML.
https://www.insyde.nl/assets/fceaf56b/A.styles.css.pagespeed.cf.AFqer3Vm-B.css

This stylesheet is being called much later in the render process, after the other JS files and stylesheets have been downloaded, parsed and executed. When the new CSS is included, browser has to rebuild the CSSOM and it takes time.

Can you try to move this stylesheet to head and then check if the performance improves?
Hi akshayranganath,

Thanks for the response!

I think you are looking at the wrong view, because my question has to do with the repeat view (http://www.webpagetest.org/result/151020_VG_BDW/1/details/cached/), which has the CSS file cached already. The only requests are for the html and analytics-script.

So in this case, removing CSS wouldn't change anything right?


RE: Strange gap on repeat view between HTML & Analytics - akshayranganath - 10-27-2015 03:19 AM

From the look of the "CPU Utilization", it looks like at the machine is loading and parsing your scripts and CSS. Hence the long gap.

If you see the chart for CPU and bandwidth, you will notice that no network requests were made. However, the CPU is flat at 100%. This would indicate that it is doing the heavy lifting of parsing stylesheets, JS files and building the DOM tree or decoding and rendering images.

I re-ran WPT with the timing and trace enabled. I am still learning this part of chrome tools. I can see a lot of activity that appears to be image rendering. Maybe someone on the forum can help you decode the output:
http://www.webpagetest.org/result/151026_KP_2198b13ab2f5558d12e9aa7ccfd19150/1/details/cached/


RE: Strange gap on repeat view between HTML & Analytics - daanw - 10-27-2015 06:57 PM

(10-27-2015 03:19 AM)akshayranganath Wrote:  From the look of the "CPU Utilization", it looks like at the machine is loading and parsing your scripts and CSS. Hence the long gap.

If you see the chart for CPU and bandwidth, you will notice that no network requests were made. However, the CPU is flat at 100%. This would indicate that it is doing the heavy lifting of parsing stylesheets, JS files and building the DOM tree or decoding and rendering images.

I re-ran WPT with the timing and trace enabled. I am still learning this part of chrome tools. I can see a lot of activity that appears to be image rendering. Maybe someone on the forum can help you decode the output:
http://www.webpagetest.org/result/151026_KP_2198b13ab2f5558d12e9aa7ccfd19150/1/details/cached/

Thanks for the research. Indeed seems to be busy doing some repaints.

What are the best practices to optimize this?