Reference
Performance
What ogygia costs a page and what it saves, with the repository's own measurements; how to measure your own app with the devtools, the profiler and tests; and the settings that make pages lighter and faster.
A Kit page hydrates the whole document, so its JavaScript grows with the page. A csr = false page ships server HTML, and only the components you mark load JavaScript. What you pay instead is ogygia’s runtime, a small script that boots on every page and wakes your islands, plus the code of each island that wakes.
This page gives the numbers for both, shows how to measure your own pages, and lists the settings that move them.
Runtime cost
The runtime is feature-selected: the build reads your marks and ships only the code they use. A page with no lakes carries no lake code, and router: false leaves the router out. So its size depends on which features your app uses.
The repository measures it for ten app profiles on every pull request, and a change that grows it by more than 0.5% needs a reason in the pull request. These numbers come from pnpm bundle-size (node apps/palaestra/e2e/bundle-size.ts) on ogygia 0.16.2: an isolated production build of each profile’s runtime, brotli-compressed, in KB of 1024 bytes. They leave out Svelte, which an island loads when it first wakes, and your own components.
- Boot is what every page of that profile downloads to start.
- Total adds every chunk the runtime loads only when it needs it: the hydration code on the first island wake, the router’s navigation code on the first prefetch or click, the replay code on the first
interactionisland, and the rest. It’s the most the runtime can ever load on one page.
| Profile | What the app uses | Boot | Total |
|---|---|---|---|
| Static content | load islands, router: false | 20.08 KB | 38.27 KB |
| Interactive | interaction islands, router: false | 20.08 KB | 38.27 KB |
| Context | load islands sharing context, router: false | 20.07 KB | 38.56 KB |
| Forms | load islands and form actions, router: false | 20.64 KB | 38.70 KB |
| Rewrite | load islands with @ogygia/rewrite, router: false | 21.02 KB | 44.19 KB |
| SPA router | load islands with the router on (the default) | 25.37 KB | 46.86 KB |
| Frozen regions | lakes, router: false | 26.59 KB | 43.98 KB |
| Deferred regions | server islands, router: false | 29.25 KB | 46.83 KB |
| Live regions | live regions, router: false | 29.94 KB | 48.58 KB |
| Everything | every feature, the profiler’s beacon and a client plugin | 35.67 KB | 58.59 KB |
Each island adds its own chunk, the code of its component and what it imports, and it loads only when the island wakes. The same component with the same schedule is one chunk however many times the page places it. Server islands and lakes add no component code at all.
To measure the runtime yourself, run the script from the repository root. --json prints the numbers for a tool, and --out <dir> writes each profile’s chunks with their sourcemaps.
pnpm bundle-sizeBenchmarks
The benchmark builds the same blog post four ways: the same prose, the same five interactive widgets and the same CSS. It measures what each version ships as the post grows from about 9,000 to 71,000 words. Island frameworks ship JavaScript only for the widgets, so their payload stays flat. Whole-page hydration ships JavaScript for the whole document, so its payload grows with the prose.
Every island framework in it ships Svelte 5 islands, so the difference between them is the architecture, not the component framework. The method is a port of Stanislav Khromov’s interactive-blogs-benchmark, run on the latest version of each tool.
Measured: ogygia 0.17.2-next.b2d5e9b, run on 2026-12-03, median of 3 passes. Mobile Lighthouse, simulated throttling. Sizes are brotli/raw of all JS the page loads. Method ported from khromov/interactive-blogs-benchmark. Run and published by ogygiajs/bench.
The benchmark lives in its own repository, ogygiajs/bench, which runs it on every change to ogygia’s main and publishes the results. These charts read the newest results when the docs are built, and name the ogygia version they measured. If that read fails, they show the last copy kept in the docs. The same repository also runs it on every ogygia pull request and posts the difference, so a change that makes pages heavier or slower shows up before it merges. To run it yourself, follow its README.
Measuring
The numbers above are for a test app. Yours depend on your islands, your data and your server. Four tools measure them, and all of them read the same events the runtime and the server emit, so they agree with each other.
- The dock (
@ogygia/devtools): open anycsr = falsepage in dev and click og devtools (or press Alt+O). Lens outlines every region with its kind and wake. The Bytes tab weighs each island’s code, the Timeline shows when it woke, and the Page tab shows the vitals, a waterfall of island wakes and hole answers, what held the first paint, and findings that name the islands at fault. - The SSR profiler (
/__profiler): profile a route by URL to see where its server render spent its time, by component, function, network call and allocation. Compare numbers on a build (one made in a non-production mode, such asvite build --mode staging): the dev server finds the same lines, but its timings include Vite’s work. - Tests (
@ogygia/testing): the same measurements as Playwright checks, so a slow page fails CI instead of being found by hand a few releases later. - The command line (
ogygia perfandogygia bisect): render pages under the profiler against a budget in CI, and find the commit that made a page slower.
For your own tools, @ogygia/insights is the analysis behind all four, as a library.
In the example, a test holds the home page to a budget for the browser (Largest Contentful Paint and the slowest island’s wake) and for the server (the median render and the JavaScript the page loads). The app under test lists testing() and devtools({ profiler: true }), as Setup shows.
import { test, expect } from './fixtures';
test('home stays fast', async ({ page, ogygia }) => {
await page.goto('/');
expect(await ogygia.page()).toMeetBudget({
lcp: 2500,
islandWakeMs: 300
});
expect(await ogygia.profile('/')).toMeetBudget({
renderMs: 50,
jsBytes: 60_000
});
});Less JavaScript
Most of a page’s JavaScript is its islands. These are the settings that cut it, roughly in the order they pay off.
- Mark less. Unmarked markup is free server HTML. Make the smallest component that needs the browser an island, not the section around it, and never the whole page. See Client islands.
- Wake later.
visible,idleand a media query load an island’s code only when it’s needed, and an island that never wakes downloads nothing.interactionships nothing until the first hover, focus or touch inside it. See Pick a schedule. - Keep static parts static. A heavy subtree inside an island (prose, a chart, highlighted code) compiles into the island’s chunk unless you mark it
wake: 'none'. Then it’s a lake: server HTML with no code. - Render on the server what isn’t interactive. A greeting or an unread count is a server island, with no JavaScript, not a client island that fetches.
- Ship less page data. An island that reads
page.datagets it in the page seed.dataShake()ships only the keys your islands read, and reading literal keys (page.data.user) lets it pin them. The build’s seed report names each read it couldn’t pin. - Cut barrel imports. One name imported from an
index.tscan pull its whole module graph into an island’s chunk.barrels()rewrites those imports to the files they name. - Leave out what you don’t use.
router: falsedrops the router, about 5 KB of boot. Each other feature costs only when a mark uses it.
Faster pages
These change when bytes move, not how many.
- Mark your hero image. Every wake except
interactionwaits until the page has painted and everyfetchpriority="high"image has loaded (at most 2.5 s), so island code doesn’t compete with your largest paint. See How the code downloads. - Prefetch the next page. With the router on, Kit’s
data-sveltekit-preload-dataattributes fetch the next page and its islands’ code before the click. See Prefetch the next page. - Warm a hole before it swaps.
prefetch: 'idle'on an on-demand server island fetches its HTML early, so the first hover needs no request. See Warm it before it swaps. - Let navigations batch. The router fetches every server island of the next page in one request, streamed back as each is ready. That’s on with no setup. See Fetch every hole in one request.
- Skip unchanged islands.
router: { serverDelta: true }tells the server which islands the browser already holds, so it doesn’t render them again. See Skip re-rendering what didn’t change. Not with postrender yet: it stores the partial render (#2300). - Inline small styles. Kit’s
inlineStyleThresholdcovers island styles too, so small island sheets ship as<style>with no request. See Where props and styles go. - Render once. A prerendered page with server islands is a static shell that fills per visitor (PPR). Postrender does the same for server-rendered pages: it stores a page on its first request and serves the bytes until something changes.
- Start the server faster. On a slow serverless box,
jumpstart()builds the server into a few files, so a cold start loads less.