Skip to content

@ogygia/devtools · Profiler

Findings

Every finding code a profiler report can raise, grouped by what it's about, with what triggers it, its threshold and whether it's a warning or a note. Match on these codes from scripts, CI budgets and tests.

On this page

A report’s findings each carry a stable code, a severity (warn or info), a message and usually a fix. The codes don’t change between versions, so a script can match them, a CI budget can fail on them with fail_on (at warn level only), and a test can expect them.

Thresholds below are per render unless they say otherwise: a page profile’s CPU, GC and allocations add up every run, and the findings divide by the number of runs. “Busy” is the CPU time the page used, with the profiler’s own share taken out.

Findings whose message starts with “In the browser:” come from your browser’s visit and share their codes with the dock: Page findings lists them. The slow patterns have codes of their own, under patterns[].kind.

const res = await fetch(
  'http://localhost:4173/__profiler/page?p=/products&format=json&fields=findings',
  {
    method: 'POST',
    headers: {
      'x-profiler-key': process.env.OGYGIA_PROFILER_SECRET ?? ''
    }
  }
);
const { findings } = (await res.json()) as {
  findings: {
    severity: string;
    code: string;
    message: string;
  }[];
};

const blocking = new Set([
  'sequential-awaits',
  'retained-per-render',
  'seed-whole'
]);
const bad = findings.filter(
  (f) => blocking.has(f.code)
);
if (bad.length) {
  for (const f of bad) console.error(`${f.code}: ${f.message}`);
  process.exit(1);
}

Recording

CodeSeverityRaised when
summaryinfoAlways: the window, how busy the CPU was, and the outbound calls.
redirectedinfoThe path redirected, and the final address was profiled.
not-a-renderwarnThe renders answered 300 or more, or under 512 bytes: a redirect or an error page, not your page.
low-confidenceinfoNo component took measurable time and there were under 200 samples: a fast page with little to measure.
cached-after-firstinfoThe warm-up render took over 8× the median and over 200 ms: the app caches the page after its first render.
prerendered-pageinfoThe route is prerendered, so production serves a file and the server render costs nothing per request.
budgetinfoFewer renders ran than asked for, to fit a time limit or because one hung (Limits).
heap-near-limitwarnThe heap was nearly full, so renders were left out to keep the process alive.
runs-set-asideinfo, warnRenders that another request for the same page overlapped were left out. A warning when fewer than two ran clean.
window-requestsinfo, warnA window’s request count and its three slowest requests, split into CPU and waiting. A warning when the slowest took a second or more.
profiler-overheadinfoThe profiler’s own CPU was over 5% of busy time and over 5 ms. It’s taken out of every number.
dev-modeinfoRecorded on the dev server: Vite’s work is included.

Time and waiting

CodeSeverityRaised when
phasesinfoThe render’s phases that took 3% of it or more, and the unaccounted time when it’s 5% or more.
sequential-awaitswarnCalls ran one after another where starting them together would save 5 ms or more and 5% of the render.
unseen-waitwarnWaits nothing recorded were over 30% of the render and over 20 ms: a driver on its own sockets, a worker, a queue.
sequential-networkwarnOutbound calls ran back to back for over half the window while the CPU was under 60% busy (and no awaits-in-a-row group explains it). Not on windows.
mostly-waitinginfoWaiting and unrecorded gaps were 60% or more of a render of 20 ms or more.
n-plus-onewarnFive or more calls to the same endpoint, numbers and ids folded (/products/:id). The top two.
slow-upstreaminfoOne host’s calls took over 20% of the window.
network-errorswarnOutbound calls failed.
upstream-splitinfoThe slowest call of 20 ms or more that sent Server-Timing: how much of its wait was their side.
billed-waitinfoOn AWS Lambda, waiting was 30% or more of the render and 50 ms or more: billed like CPU.
parent-chainwarnA page load started only after its layout load finished, usually through await parent().
universal-loadinfoA universal load waited 5 ms or more: it runs again in the browser on client navigations.
busy-instancewarnOther requests were in flight for a tenth of the window or more.
self-fetchinfoThe render called its own server, or read a prerender remote function’s answer over HTTP.
holes-in-flightinfoThe page’s own deferred holes were answered while it rendered.
cold-startinfo, warnThe first render’s extra over a warm one, per file, came to 20 ms or more. A warning when it took 1.5× a warm render and 50 ms more.
cold-instanceinfoOn AWS Lambda, the instance took 100 ms or more from its process starting to its first request.
slower-each-runwarnEach render took longer than the one before, over 4 runs or more, three quarters of pairs agreeing, rising 3 ms and 5% or more.
component-cold-runinfoA component’s first render was its slowest by far (5 ms or more): a cold cache or a lazy import.
component-variancewarnA component took 3× its median and 10 ms more in one run.

CPU

CodeSeverityRaised when
top-cpuinfoThe biggest CPU category.
top-componentinfoThe most expensive component, when no warning below applies.
component-repeatwarnA component holding 20% of busy and 5 ms or more rendered 20 times or more.
component-heavywarnOne render of such a component cost 20 ms or more.
hot-functionwarnOne function of yours or a package’s held 20% of busy, or three together held 40% with the first at 12%, each 5 ms or more.
path-groupinfo, warnHot functions that share a caller (Paths to fix). A warning at 15% of busy and 3 ms.
hot-listinfoA component rendered 20 times or more under one parent, holding 10% of busy.
markup-heavyinfoA component’s own time (15% of busy and 5 ms or more) is 70% or more Svelte writing its template.
logic-heavyinfoThe same, but 70% or more its script.
serializationwarndevalue or a package’s stringify took 10% of busy and 5 ms or more (Kit’s own copy left out).
deoptwarnA function V8 deoptimized twice or more, with 2 ms or more of self time. The top three.
sync-iowarnSynchronous file, process, compression or key-derivation calls took 2 ms or more.
promise-stormwarn10,000 promises or more per render.
memo-candidateinfoAn app function called many times per render at a steady cost: a cache keyed on its argument may help.
render-leftoverwarnA render started an interval, or a timer still pending after the response went out.
kit-etaginfoKit’s ETag hash of the HTML took 3% of busy and 3 ms or more.
kit-unevalinfoKit’s devalue.uneval of the server load data took 3% of busy and 3 ms or more.

Spans

From custom spans. “Wall” counts overlapping spans once.

CodeSeverityRaised when
span-errorswarnA span threw.
span-openwarnA span never ended: a hung call, or a span.start() with no end().
span-repeatwarnA span ran 5 times or more per render, with a wall time of 5 ms and 5% of the render or more: the N+1 shape.
span-slowwarnA span took 10 ms and 20% of the render or more.
cache-misseswarnSpans marked cache: 'miss' cost 5 ms and 5% of the render or more.
value-driveninfoA span’s time follows a numeric attribute with a fit of 0.8 or more, over 5 spans or more.
client-markinfoYour browser marks: the slowest, and any that failed.

Memory

CodeSeverityRaised when
gc-heavywarnGC was over 15% of busy time and over 5 ms.
gc-pausewarnOne GC pause was over 20 ms.
gc-causewarnGC took 5 ms or more, and one line caused 3 ms and 15% of it.
alloc-burstinfoThe heap grew 20 MB or more, and one 20 ms stretch made 30% of that.
retained-per-renderwarnA render kept 5 MB or more alive after a full collection.
heap-filled-beforewarnA page profile started on 256 MB or more of heap, six or more renders’ worth of what the page keeps (8 MB or more each).
mem-growthwarnRSS grew over 50 MB during the recording, and no kept memory explains it.
loop-stallwarnThe event loop’s p99 delay was over 50 ms.

Page data and islands

CodeSeverityRaised when
ogygia-costinfoWhat ogygia’s handle added: its transform time, islands, holes and side channels.
key-unreadwarnpage.data keys no component reads, with what building them cost.
seed-server-onlyinfo2 KB or more of the seed is keys only the server renders.
seed-wholewarnAn island reads page.data whole, so every key ships.
seed-explainerinfoOne seed key is 20 KB or more: who reads it.
seed-largewarnThe page seed is over 100 KB.
seed-devaluewarnThe seed left the JSON lane for devalue, naming the value that forced it.
props-largewarnIsland props total over 200 KB.
props-devalueinfo, warnAn island’s props needed devalue. A warning from 2 KB.
fp-unstableinfoAn island’s fingerprint changed between renders because a prop did.
html-held-openwarnA streamed promise held the document open, and every island with it.
dom-largewarnThe HTML makes 1,500 elements or more.
img-unsizedinfo, warnImages in the HTML have no width and height. A warning when the visit’s CLS is 0.1 or more.
bfcache-no-storewarnThe page answers Cache-Control: no-store, so the back/forward cache never keeps it.
hole-cache-coldwarnA hole with a maxAge was asked for twice or more and never hit its cache.
hole-cacheinfoA hole’s cache hits.
hole-uncachedinfoHoles with no maxAge that take 20 ms or more a render.
wake-inertinfo, warnAn island wakes but the build found no interactivity in it: ship it as a lake (wake: 'none'). A note when a lake would save under 10 KB.
wake-crowdinfoOne island has 10 or more copies, each waking on its own at load, idle or visible: wrap the list in one island, or wake on interaction.
islands-js-heavywarnThe page’s islands load 300 KB of JS or more.
island-heavy-moduleinfoOne module is 40% or more of an island’s own code, and 20 KB or more.
island-barrelwarnAn island ships a re-export barrel whole: little code of its own and six or more modules behind it. With barrels() listed, it quotes why the plugin left it.
never-hydratedinfo, warnAn island that should have woken never reported hydrating, while others did: a visible island on a page that can’t scroll, or a load island that throws. A note for a visible island that may simply be off screen.
hydration-mismatchwarnAn island threw away its server DOM and rendered again, usually because something edited the HTML between the render and the wake.
client-hydrateinfoThe slowest island to hydrate, its median wake split into loading its modules, waiting its turn and the hydrate step, and, when it waited, the island it waited behind.
island-browser-readinfoAn island reads a browser-only value while rendering.

Page weight

Only on a build, where the page’s files are weighed.

CodeSeverityRaised when
js-at-startinfo, warnThe page runs 150 KB of JS or more at start. A warning from 300 KB.
js-lazyinfo50 KB or more of island JS waits until it’s needed, when js-at-start didn’t fire.
runtime-scriptsinfo, warnYour browser loaded 10 KB or more of JS the HTML never names. A warning from 50 KB.
duplicate-moduleinfo, warnA module ships twice on the page, 2 KB or more extra. A warning from 10 KB.
render-blockingwarnThree or more files, or 100 KB or more, must arrive before anything paints.
css-unscopedwarnA component’s styles shipped without their scope, so they apply to the whole page.
assets-missedinfoSome files couldn’t be weighed (a 404, a timeout, or the time budget). weigh=full fixes the budget case.
page-unweighedinfoThe page couldn’t be weighed at all.

Browser

Beside the codes from Page findings, a report raises these about its visits:

CodeSeverityRaised when
browser-vitalsinfoThe visit’s TTFB, LCP, CLS and INP next to the server render, when neither gap below applies.
ttfb-gapwarnTTFB was 2× the render or more, and 200 ms more.
lcp-gapwarnLCP came 500 ms or more after TTFB, and at least TTFB again.
browser-limitsinfoThe visiting browser can’t report some measurements, so findings that need them are missing.
other-screeninfoA visit on another screen size saw problems this one didn’t.
other-browserinfoA visit in another browser engine saw problems this one didn’t.