TL;DR — Most frontend performance problems are not framework problems. Four audits find 80% of the issues — image handling, font loading strategy, JS bundle size and third-party script impact. Fix those before considering a migration.
“The site is slow, should we migrate to Astro?” is the question. “Have you fixed the images?” is the better question. Most sites can hit excellent Core Web Vitals on whatever framework they are already on. The work is unglamorous and effective.
The four audits
1. Image audit
- Every image served in the right format (AVIF/WebP with fallback)
- Right size for the viewport, not the original file
- Lazy-loaded below the fold
- Above-the-fold hero image preloaded
- No CLS from images without dimensions
2. Font audit
- Self-hosted or via preconnect to font CDN
font-display: swaporoptional- Variable fonts where you use multiple weights
- WOFF2 only, no legacy formats
- Subset to the characters you actually use
3. JS bundle audit
- Code-split per route, not one mega-bundle
- Dynamic imports for below-the-fold components
- Tree-shaken — confirm with a bundle visualizer
- Polyfills served only to browsers that need them
- No duplicate libraries (multiple versions of lodash, multiple date libraries)
4. Third-party audit
- Analytics — defer or async, never blocking
- Chat widgets — lazy-load on first interaction
- Cookie consent — minimize, do not gate render on it
- Tag managers — review tag list, remove what nobody owns
When framework migration is the answer
Rarely. Specifically: you are on a heavy client-only framework and your site is content-driven (blog, docs, marketing). In that case server rendering or SSG buys real wins. For app-shaped products, the framework is rarely the bottleneck.
Frequently asked questions
Should I migrate to a different framework for performance?
Usually no. Most “slow site” problems are not framework problems. Images, fonts, third-party scripts and unoptimized JS bundles cause the majority of issues. Audit those first.
Lighthouse score or real user metrics?
Real user metrics for decisions, Lighthouse for spot checks. Lighthouse runs in ideal conditions; your users do not. Core Web Vitals from CrUX or RUM is what Google actually uses for ranking.
Working on something similar?
T-Square architects, builds and operates production systems for learning, AI and custom software products. Talk to a senior engineer for a second opinion.
