WebPagetest Forums
Problem with start render time - 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: Problem with start render time (/showthread.php?tid=14903)



Problem with start render time - Andrew Roark - 05-19-2017 02:11 AM

Why I have Start Render time so far?

Why the browser waits with rendering when it has downloaded css and JS?

My results:
https://www.webpagetest.org/result/170518_GZ_13B6/
or
https://www.webpagetest.org/result/170518_4Q_13B9/

Thanks for advices! :-)


RE: Problem with start render time - bgportal - 05-21-2017 07:15 PM

FAILED - (97.5 KB, compressed = 48.2 KB - savings of 49.3 KB) - https://ads2.czc.cz/www/images/b7c92710eaba0c650cc20776d67ca4f7.jpg
WARNING - (116.3 KB, compressed = 67.6 KB - savings of 48.6 KB) - https://ads2.czc.cz/www/images/5fe142094e68afb99e2a1df9cf18c2d2.jpg
WARNING - (114.5 KB, compressed = 66.7 KB - savings of 47.8 KB) - https://ads2.czc.cz/www/images/76f67fd2dcf52c422cda86fda4dac066.jpg
WARNING - (52.8 KB, compressed = 33.5 KB - savings of 19.3 KB) - https://ads2.czc.cz/www/images/fd84e92cf35a696181da407a374d63ef.jpg
WARNING - (39.4 KB, compressed = 31.2 KB - savings of 8.2 KB) - https://ads2.czc.cz/www/images/19b7919d08bd71d18c207a6b4ac866d9.jpg


RE: Problem with start render time - Andrew Roark - 05-24-2017 03:45 AM

Ok... and where is the problem?


RE: Problem with start render time - pmeenan - 05-30-2017 10:55 PM

The browser's parser stops for every non-async JS it encounters, waits for it to download, and then executes the script before it can proceed to the next bit of html. If any of those scripts use document.write() to inject other scripts then it needs to wait for those to download and execute before continuing.

This is by-spec and all browsers do it.

If css is pending then browsers will also not paint anything until the css finishes loading because that is what defines the layout of the content to paint.


RE: Problem with start render time - pmeenan - 05-30-2017 10:59 PM

Sorry, in case you were asking why it waits even after it has finished the css/js, it is hard to say without seeing the HTML but most browsers will try to delay layout/paint as long as they are working on things to avoid having to re-do the layout and waste time.

It is also possible that what was first painted was a blank screen depending on what the HTML looks like (the browser-reported first paint time was 1.5s while the actual first content rendered was at 2.2s.


RE: Problem with start render time - Andrew Roark - 06-01-2017 11:30 PM

Thanks. Can the problem be caused by a bad HTML structure? Now <content> is first, then <header>. Can the solution be put in the first place <header>?