time few days ago. I have made a simple live example https://nuxt.itdevv.com. I have here 40 cards and 400ms blocking time accordingly. Here is github project https://github.com/AidOnline01/cards-grid.
Do you have any tips how to decrease total blocking time?
by removing all scripts that would save you about 200ms or lazy load all scripts?
Can you be more specific? I have lazy loaded CardsGrid and Card components. There is only Button, ButtonBtn, ButtonLink left
not sure how Vue lazyload works. if that site does nothing else than the demo, there is zero need of a JS framework.(just use css & probably 2kb js to only lazyload the images)
That's a demo specific for demonstration of a problem I encountered on big sized project. The problem is not in images, lazy images won't help main thread blocking. What to do with long mainthread tasks i could not figure out (
what to do with long mainthread tasks: don't execute anything that's not really important before TTI.
the rest of the solution: https://web.dev/long-tasks-devtools/#what-is-causing-my-long-tasks
Обсуждают сегодня