Help Interpreting Waterfall Results - Long Task
|
02-13-2021, 10:55 AM
(This post was last modified: 02-15-2021 10:43 AM by BensTechLab.)
Post: #1
|
|||
|
|||
![]()
Hello Fellow Website Optimizers!
So I've been optimizing my website and think I have it pretty good. It gets a perfect rating on google pagespeed insights (lighthouse), gtmetrix.com and webpagetest.org. My only main weakness is TTFB as I'm currently self-hosting my site from home on a Synology NAS (protecting my origin IP with CloudFlare). I'll fix my TTFB soon when I move the hosting. However, my webpagetest.org results show a long ~1.2 second delay between first contentful paint and "fully loaded". I'm using the super popular "lazysizes" JS library to lazy load images on the site. The last 2 requests you see are lazy loaded images. However why such a long delay? It seems the browser main thread is mostly idle. Bandwidth is 0. Cpu utilization low-ish. What does the long green bar on the bottom right of this waterfall mean? ![]() If my post helps you, click the little "user +" icon on the lower left to give me a rep! |
|||
02-15-2021, 10:47 AM
Post: #2
|
|||
|
|||
RE: Help Interpreting Waterfall Results - Long Task
Ok, while waiting for my post to be moderated, I actually solved my problem (or at least understand it).
The lazysizes JS deferred image loader has a weird "feature" where it insert a +1 second delay if your page onload event is faster than 1 second. Excerpt from lazysizes source code: Code: var onload = function() { If my post helps you, click the little "user +" icon on the lower left to give me a rep! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)