vercel/speed-insights

Significant performance impact on Astro

Pramuspl opened this issue · 5 comments

Since I added <SpeedInsights /> to the base layout of my Astro project, navigating between pages causes a delay in style loading. For a moment the page looks like on the screen attached. It's a fraction of a second but the 'flash' it causes is clearly visible. Network speed throttling extends the duration of that state.

Zrzut ekranu 2024-03-7 o 14 10 57

Hey!
Do you have a reproduction for us?
https://speed-insights-astro-vercel-analytics.vercel.app/
We can't reproduce this on our deployment. Thanks!

Here's a preview of my website with the insights (You can click on "Some of my work..." to navigate to another page, best visible in dark mode with Slow 3G throttling in dev tools):
https://adrian-www-astro-paper-vd0rs9pmt-pramuspl.vercel.app/

Here's a 1:1 deployment except the Insights are removed:
https://adrian-www-astro-paper-qkv117yc4-pramuspl.vercel.app/

Please note that I'm using View Transitions. Maybe the problem occurs only there.

@tobiaslins do you need any other info?

Hey! I just looked into that and I can't see any difference in behaviour and I also don't see a reason why something should be blocked.

I also can't reproduce the original bugs/flash you mentioned.

If you slow down your network speed in dev tools to slow 3G and click on "Some of my work..." in the bottom-left on https://adrian-www-astro-paper-vd0rs9pmt-pramuspl.vercel.app/ , the /projects page appears without styling at first.