vercel / speed-insights

Vercel Speed Insights package
https://vercel.com/docs/speed-insights
Apache License 2.0
54 stars 6 forks source link

Significant performance impact on Astro #61

Open Pramuspl opened 4 months ago

Pramuspl commented 4 months ago

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

tobiaslins commented 4 months ago

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!

Pramuspl commented 3 months ago

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.

Pramuspl commented 3 months ago

@tobiaslins do you need any other info?

tobiaslins commented 3 months ago

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.

Pramuspl commented 3 months ago

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.