# Why FCP comes in 4 bands

The same Books app in 19 frameworks, built twice each: once with the framework's default settings (naive) and once optimized. Mobile Lighthouse, simulated Slow 4G, 4× CPU throttle.

FCP values bunch into 4 groups with gaps between them. Each group matches how many requests have to finish one after another before the page can paint. Take one request out of that chain and the app drops a whole band.

| Band | FCP | What the browser waits for |
| --- | --- | --- |
| Fast | 0.9–1 s | One request: the HTML already contains everything needed to paint |
| Middle | 1.1–1.5 s | Two serialized requests: HTML plus one asset or render step |
| Slow-middle | 1.7–2 s | Three serialized requests, or a cold cache / cold worker |
| Baseline | 2.4–2.8 s | Four or more serialized requests, including a cross-origin font |

## Every port, naive vs optimized

Home-page FCP. Each figure is the median across 3 hosts (vercel, netlify, cloudflare) of each host's median PageSpeed Insights run. Rows are sorted by band, slowest naive band first, then by name; inside a band the order says nothing about speed. Per-host numbers: https://framework-compare.vercel.app/benchmark.md

| Port | Naive FCP | Optimized FCP | Band |
| --- | --- | --- | --- |
| Qwik City | 1.66 s | 0.94 s | Slow-middle → Fast |
| Waku | 1.56 s | 0.91 s | between Middle and Slow-middle → Fast |
| Analog | 1.51 s | 0.91 s | Middle → Fast |
| Astro | 1.54 s | 0.94 s | Middle → Fast |
| Ember | 1.51 s | 0.93 s | Middle → Fast |
| Fresh | 1.51 s | 0.91 s | Middle → Fast |
| Marko | 1.51 s | 0.91 s | Middle → Fast |
| Nuxt | 1.54 s | 0.92 s | Middle → Fast |
| Pracht | 1.51 s | 0.95 s | Middle → Fast |
| React Router | 1.51 s | 0.91 s | Middle → Fast |
| RedwoodSDK | 1.51 s | 0.91 s | Middle → Fast |
| Remix 3 | 1.51 s | 0.91 s | Middle → Fast |
| SolidStart | 1.51 s | 0.93 s | Middle → Fast |
| SvelteKit | 1.51 s | 0.94 s | Middle → Fast |
| TanStack Start (React) | 1.51 s | 0.93 s | Middle → Fast |
| TanStack Start (Solid) | 1.51 s | 0.93 s | Middle → Fast |
| Vike | 1.54 s | 0.92 s | Middle → Fast |
| Angular (SSR) | 0.78 s | 0.79 s | Fast either way |
| Next | 0.91 s | 0.93 s | Fast either way |

## What each band waits on

### Fast (0.9–1 s): the HTML is the only request

The first response holds everything needed to paint. The CSS is inlined in a `<style>` tag, the font is self-hosted and preloaded (or text paints in a fallback font while it loads), and the server sends the HTML without waiting on a slow database query.

Any app whose first paint needs only the HTML lands here, whatever the framework.

### Middle (1.1–1.5 s): one link remains

The HTML arrives, then the browser waits for one more round of requests before it paints. Usually that is a stylesheet linked from the HTML: the app’s own CSS bundle, a Google Fonts stylesheet, or both fetched side by side. A self-hosted font that isn’t preloaded, or a server render that misses the cache, adds the same single step.

This is where most frameworks’ default settings put the Books app: the CSS ships as a separate file, so the browser can’t paint until it arrives.

### Slow-middle (1.7–2 s): two links remain, or the cache is cold

Two requests wait in sequence after the HTML, or the HTML itself is slow because a cache or a serverless worker was cold. A cold worker has to start, query the database and render before it sends the first byte. The same code can measure a band faster a few minutes later, once the cache is warm.

The fix is usually in caching and deployment, not in the components: keep the HTML cached at the edge and make the data cache persistent.

### Baseline (2.4–2.8 s): the full baseline waterfall

The full waterfall:

```
HTML (waits on a database query)
  -> render-blocking CSS bundle
    -> Google Fonts CSS from fonts.googleapis.com
      -> woff2 from fonts.gstatic.com (display=block)
```

That is four requests in sequence, two of them to new origins. Preconnecting to the Google origins saves the DNS and TLS setup, but both requests still have to finish before text paints, because `display=block` hides text until the font arrives.

## Why FCP moves in steps

The browser can’t paint text until a few things arrive, often one after another: the HTML; the stylesheet for that text, unless the CSS is inlined in the HTML; and, if the font loads with `font-display: block`, the font file. Each can depend on the one before it. This is the **critical request chain**, and every link in it costs a full round trip.

Under mobile Lighthouse (simulated Slow 4G and a 4× CPU slowdown), each round trip costs about 0.4–0.6 s, and they all cost about the same. Making a request smaller barely moves FCP. Removing it saves a whole step. A cache is either warm or cold, so it adds a step or it doesn’t.

That is why results bunch into bands instead of spreading out, and why a partial fix doesn’t move an app part of the way. Inlining the CSS while keeping a blocking font request leaves the app in the same band. It moves only when a whole link leaves the chain.

## Where the Baseline band comes from

An earlier round of measurements covered six ports whose naive builds used the full waterfall above: a linked CSS bundle and the Geist font loaded from Google Fonts. Every one of them landed in Baseline. Their optimized builds at that point had dropped Google Fonts but still kept one or two links in the chain, so they stopped around Middle instead of reaching Fast.

None of the current naive builds is that slow, so this is the only place on the site where the Baseline band is filled.

| Port | Naive FCP | Optimized FCP | Band |
| --- | --- | --- | --- |
| Ember | 2.7 s | 1.6 s | Baseline → between Middle and Slow-middle |
| Nuxt | 2.6 s | 1.3 s | Baseline → Middle |
| SolidStart | 2.4 s | 1.4 s | Baseline → Middle |
| SvelteKit | 2.6 s | 1.5 s | Baseline → Middle |
| Waku | 2.5 s | 1.4 s | Baseline → Middle |
| Pracht | 2.5 s | 1.3 s | Baseline → Middle |

These are older builds than the chart above, and each figure is the average of single Lighthouse runs on Vercel, Netlify and Cloudflare, not a median of repeated runs. Read the two charts separately.

## How to move an app into a faster band

### 1. Remove the cross-origin font request

This change saved the most, about 1–1.5 seconds in these runs.

- Replace the Google Fonts `<link>` with a self-hosted font: `@fontsource-variable/geist`, `next/font` or a woff2 file in the project.
- Preload the font so the browser requests it alongside the HTML:
  
  ```html
  <link rel="preload" as="font" type="font/woff2" href="/fonts/geist.woff2" crossorigin>
  ```
- Set `font-display: swap` or `optional` so text paints in a fallback font instead of waiting.
- Once the font is local, delete the `preconnect` hints for `fonts.googleapis.com` and `fonts.gstatic.com`.

`solid-books/src/Document.tsx` does all of this: it imports the woff2 file, preloads it and inlines the CSS.

### 2. Inline the stylesheet

The page can't paint until a separate stylesheet downloads. If the CSS is small (under about 10 KB gzipped), put it in the HTML:

- **Next:** [`experimental.inlineCss: true`](https://nextjs.org/docs/app/api-reference/config/next-config-js/inlineCss).
- **SvelteKit:** [`inlineStyleThreshold: Number.POSITIVE_INFINITY`](https://svelte.dev/docs/kit/@sveltejs-kit-vite) (or a threshold in bytes).
- **Solid/Vite:** import the CSS with [`?inline`](https://vite.dev/guide/assets#explicit-url-imports) and render a `<style>` tag on the server.
- **Pracht:** [`inlineCss: true`](https://pracht.resynapse.dev/docs/styling).
- **Nuxt:** [`features.inlineStyles: true`](https://nuxt.com/docs/4.x/guide/going-further/features).

For large CSS, serve the file from your own origin and preload it instead.

### 3. Cache the data the HTML depends on

If the server queries the database before sending the HTML, that query adds a full step, which no client-side change can remove.

- **Next:** mark the query [`'use cache'`](https://nextjs.org/docs/app/api-reference/directives/use-cache) and give it a [`cacheLife`](https://nextjs.org/docs/app/api-reference/functions/cacheLife).
- **Nuxt:** use `defineCachedEventHandler`, set `nitro.storage.cache` and add a `routeRules` cache rule ([Nitro cache docs](https://nitro.build/docs/cache)).
- **SvelteKit, SolidStart and others:** put a cache in front of the query, such as [Vercel Runtime Cache](https://vercel.com/docs/caching/runtime-cache), [Netlify Blobs](https://docs.netlify.com/blobs/overview/) or the [Cloudflare Cache API](https://developers.cloudflare.com/workers/runtime-apis/cache/). `svelte-books/src/lib/server/catalog-cache.ts` picks the right one for each host.

On Cloudflare, use a **persistent** cache. In-memory caches are lost between Worker isolates, so a cache that works on Vercel can miss on Workers without any error.

### 4. Make the HTML warm at the edge

A Worker that renders on every request adds a step even when the data is cached. Serve the HTML from a cache instead, using one of:

- static generation, where the page allows it;
- ISR or stale-while-revalidate;
- Cloudflare's Cache API (`caches.default`) or KV for the rendered page;
- Nitro's persistent cache driver for the host.

In the Cloudflare results, a cached HTML page is the difference between the 1.7–2.0s and 1.1–1.5s bands.

### 5. Render the page shell on the server

If client-side JavaScript builds the first visible markup, FCP waits for the bundle to download, parse and run. Render the page shell on the server and stream slower parts in behind boundaries (Suspense in React, or the framework's equivalent). A static shell can paint as soon as the HTML arrives.

### 6. Measure the critical request chain

The Lighthouse score alone won't tell you which band an app is in or why. To find out:

1. Open Lighthouse's **critical request chain**, or the DevTools Performance panel at the FCP mark.
2. List every request that has to finish before FCP.
3. Count how many happen in sequence. That count predicts the band.
4. Remove one, measure again, and repeat.

Things to check along the way:

- Requests to `fonts.googleapis.com` or `fonts.gstatic.com` add two steps.
- A separate main stylesheet adds one.
- A slow HTML response on a cold cache means a server step.
- On Cloudflare, check whether the page came from the cache or was rendered again.

## In one sentence

FCP goes up in steps, one for each request that has to finish in sequence: self-host and preload the font, inline the CSS, cache the data and the HTML, and render the shell on the server, and each change moves the app down a band.

## Limits of these measurements

- **A band is a tie.** Lighthouse doesn’t slow the real load down. It loads the page at full speed and estimates what Slow 4G would do from that trace, so the tenths of a second between ports in one band come from the estimate, not from the app. Angular is the clearest case: both its builds land under 0.9 s, ahead of every other port, yet in the real load other Fast ports paint as soon or sooner. The estimate likely favours Angular because its first response has fewer requests that look critical: the CSS and the Google Fonts stylesheet are inlined. Benchmark shows the real load’s first paint as Raw FCP next to the estimate.
- **Lab data only.** Mobile Lighthouse results on a cold, throttled first load. Real users with warm caches, faster connections or repeat visits see different numbers.
- **First load only.** Prefetching, navigating on pointer-down and keeping data in memory make an app feel faster after the first page, and FCP doesn't capture any of them.
- **One host can sit a band higher.** A cold cache or a cold worker adds a step on that host alone. The medians smooth that out; the benchmark page shows each host.
- **Inlined CSS isn't cached separately.** It downloads again with every HTML response, which suits small stylesheets and hurts large ones.

---

HTML version: https://framework-compare.vercel.app/measured · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
