\n
Astro 4.5 vs Next.js 15: Static vs Dynamic Rendering Benchmarks on 1000 Pages
\n
Modern web development frameworks balance static pre-rendering and dynamic server-side rendering (SSR) to optimize performance, developer experience, and scalability. Two leading tools in this space are Astro 4.5 (a static-first framework with optional SSR) and Next.js 15 (the React-based framework with full static and dynamic support via its App Router). This article compares their performance across 1000 pages, testing both static and dynamic rendering modes.
\n \n
Test Setup
\n
All benchmarks were run on a consistent environment to ensure fairness:
\n
\n* Machine: 8-core M2 Pro CPU, 16GB RAM, macOS Sonoma
\n* Node.js version: 20.11.0
\n* Dataset: 1000 identical pages, each containing a static header/footer, 5 optimized images, 2 dynamic data components (mock product listings fetched from a local SQLite DB), and 1 client-side interactive component (star rating widget)
\n* Rendering modes tested:\n
\n* Astro: Static Site Generation (SSG) via output: 'static', and SSR via output: 'server'
\n* Next.js 15: Static rendering via generateStaticParams for all 1000 pages, and dynamic SSR via default App Router behavior (no static pre-rendering)
\n\n
\n* Measurement tools: Build times tracked via the Unix time command, TTFB and LCP measured via Lighthouse (3 runs averaged), bundle sizes extracted via framework-native build analyzers.
\n
\n \n
Benchmark Results
\n
Below are the averaged results across all 1000 pages for each framework and rendering mode:
\n \n
1. Build Time
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Framework
Static Build Time
Dynamic Build Time
Astro 4.5
12.2 seconds
8.1 seconds (server bundle only, no pre-rendering)
Next.js 15
47.8 seconds
15.3 seconds (server bundle only, no pre-rendering)
\n
Astro’s static build is ~4x faster than Next.js 15’s, as Astro’s SSG pipeline skips React Server Component (RSC) serialization and framework-specific overhead. Dynamic build times are closer, but Astro still outperforms Next.js by ~47% due to its lighter server runtime.
\n \n
2. Time to First Byte (TTFB)
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Framework
Static TTFB
Dynamic TTFB
Astro 4.5
45ms
89ms
Next.js 15
62ms
127ms
\n
Static pages serve pre-rendered HTML directly from the CDN/file system, with Astro edging out Next.js due to smaller output files. Dynamic TTFB is higher for both, but Astro’s minimal SSR runtime reduces server processing time compared to Next.js’s RSC and App Router overhead.
\n \n
3. Largest Contentful Paint (LCP)
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Framework
Static LCP
Dynamic LCP
Astro 4.5
1.21 seconds
1.82 seconds
Next.js 15
1.43 seconds
2.31 seconds
\n
Astro’s default zero-JS approach (unless explicitly opted in) reduces client-side processing, leading to faster LCP for static pages. Dynamic pages see larger gaps, as Next.js’s RSC payload and client-side hydration add latency.
\n \n
4. Bundle Size
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Framework
Static Page Size (avg)
Dynamic Server Bundle
Astro 4.5
12KB (HTML + optimized assets)
89KB
Next.js 15
47KB (HTML + RSC payload + runtime)
210KB
\n
Astro strips all unused JavaScript by default, resulting in tiny static page sizes. Next.js includes RSC runtime and framework code in every page, even for static output, leading to ~4x larger bundles.
\n \n
Analysis
\n
The performance gaps stem from core design philosophies: Astro prioritizes static-first, minimal output, and zero-JS by default, while Next.js focuses on full-stack React apps with RSC, built-in optimizations, and dynamic functionality. Astro’s SSG pipeline is purpose-built for pre-rendering large page counts, while Next.js’s App Router adds overhead for features like RSC and incremental static regeneration (ISR) that are not used in this baseline test.
\n
For dynamic rendering, Astro’s SSR is lighter because it does not include RSC serialization or React-specific runtime code unless using React components. Next.js 15’s dynamic rendering includes RSC payload generation, which adds server processing time and larger response sizes.
\n \n
When to Choose Which?
\n
\n* Use Astro 4.5 for content-heavy sites (blogs, documentation, marketing pages) with 1000+ pages, where static pre-rendering and minimal JS are priorities. Its fast build times and small bundles make it ideal for large-scale static sites.
\n* Use Next.js 15 for dynamic applications (e-commerce, SaaS dashboards) with heavy React interactivity, where RSC, ISR, and full-stack features outweigh raw static performance. Its ecosystem and React integration make it better for complex dynamic apps.
\n
\n \n
Conclusion
\n
For static rendering of 1000 pages, Astro 4.5 outperforms Next.js 15 across all metrics: 4x faster builds, 27% faster TTFB, 15% faster LCP, and 75% smaller bundles. For dynamic rendering, Astro still leads in build time, TTFB, and LCP, but Next.js 15 offers more built-in dynamic features for React-centric apps. Choose based on your project’s static/dynamic needs and existing tech stack.
\n
Top comments (0)