@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.
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
| Code | Severity | Raised when |
|---|---|---|
summary | info | Always: the window, how busy the CPU was, and the outbound calls. |
redirected | info | The path redirected, and the final address was profiled. |
not-a-render | warn | The renders answered 300 or more, or under 512 bytes: a redirect or an error page, not your page. |
low-confidence | info | No component took measurable time and there were under 200 samples: a fast page with little to measure. |
cached-after-first | info | The warm-up render took over 8× the median and over 200 ms: the app caches the page after its first render. |
prerendered-page | info | The route is prerendered, so production serves a file and the server render costs nothing per request. |
budget | info | Fewer renders ran than asked for, to fit a time limit or because one hung (Limits). |
heap-near-limit | warn | The heap was nearly full, so renders were left out to keep the process alive. |
runs-set-aside | info, warn | Renders that another request for the same page overlapped were left out. A warning when fewer than two ran clean. |
window-requests | info, warn | A 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-overhead | info | The profiler’s own CPU was over 5% of busy time and over 5 ms. It’s taken out of every number. |
dev-mode | info | Recorded on the dev server: Vite’s work is included. |
Time and waiting
| Code | Severity | Raised when |
|---|---|---|
phases | info | The render’s phases that took 3% of it or more, and the unaccounted time when it’s 5% or more. |
sequential-awaits | warn | Calls ran one after another where starting them together would save 5 ms or more and 5% of the render. |
unseen-wait | warn | Waits nothing recorded were over 30% of the render and over 20 ms: a driver on its own sockets, a worker, a queue. |
sequential-network | warn | Outbound 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-waiting | info | Waiting and unrecorded gaps were 60% or more of a render of 20 ms or more. |
n-plus-one | warn | Five or more calls to the same endpoint, numbers and ids folded (/products/:id). The top two. |
slow-upstream | info | One host’s calls took over 20% of the window. |
network-errors | warn | Outbound calls failed. |
upstream-split | info | The slowest call of 20 ms or more that sent Server-Timing: how much of its wait was their side. |
billed-wait | info | On AWS Lambda, waiting was 30% or more of the render and 50 ms or more: billed like CPU. |
parent-chain | warn | A page load started only after its layout load finished, usually through await parent(). |
universal-load | info | A universal load waited 5 ms or more: it runs again in the browser on client navigations. |
busy-instance | warn | Other requests were in flight for a tenth of the window or more. |
self-fetch | info | The render called its own server, or read a prerender remote function’s answer over HTTP. |
holes-in-flight | info | The page’s own deferred holes were answered while it rendered. |
cold-start | info, warn | The 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-instance | info | On AWS Lambda, the instance took 100 ms or more from its process starting to its first request. |
slower-each-run | warn | Each 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-run | info | A component’s first render was its slowest by far (5 ms or more): a cold cache or a lazy import. |
component-variance | warn | A component took 3× its median and 10 ms more in one run. |
CPU
| Code | Severity | Raised when |
|---|---|---|
top-cpu | info | The biggest CPU category. |
top-component | info | The most expensive component, when no warning below applies. |
component-repeat | warn | A component holding 20% of busy and 5 ms or more rendered 20 times or more. |
component-heavy | warn | One render of such a component cost 20 ms or more. |
hot-function | warn | One 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-group | info, warn | Hot functions that share a caller (Paths to fix). A warning at 15% of busy and 3 ms. |
hot-list | info | A component rendered 20 times or more under one parent, holding 10% of busy. |
markup-heavy | info | A component’s own time (15% of busy and 5 ms or more) is 70% or more Svelte writing its template. |
logic-heavy | info | The same, but 70% or more its script. |
serialization | warn | devalue or a package’s stringify took 10% of busy and 5 ms or more (Kit’s own copy left out). |
deopt | warn | A function V8 deoptimized twice or more, with 2 ms or more of self time. The top three. |
sync-io | warn | Synchronous file, process, compression or key-derivation calls took 2 ms or more. |
promise-storm | warn | 10,000 promises or more per render. |
memo-candidate | info | An app function called many times per render at a steady cost: a cache keyed on its argument may help. |
render-leftover | warn | A render started an interval, or a timer still pending after the response went out. |
kit-etag | info | Kit’s ETag hash of the HTML took 3% of busy and 3 ms or more. |
kit-uneval | info | Kit’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.
| Code | Severity | Raised when |
|---|---|---|
span-errors | warn | A span threw. |
span-open | warn | A span never ended: a hung call, or a span.start() with no end(). |
span-repeat | warn | A 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-slow | warn | A span took 10 ms and 20% of the render or more. |
cache-misses | warn | Spans marked cache: 'miss' cost 5 ms and 5% of the render or more. |
value-driven | info | A span’s time follows a numeric attribute with a fit of 0.8 or more, over 5 spans or more. |
client-mark | info | Your browser marks: the slowest, and any that failed. |
Memory
| Code | Severity | Raised when |
|---|---|---|
gc-heavy | warn | GC was over 15% of busy time and over 5 ms. |
gc-pause | warn | One GC pause was over 20 ms. |
gc-cause | warn | GC took 5 ms or more, and one line caused 3 ms and 15% of it. |
alloc-burst | info | The heap grew 20 MB or more, and one 20 ms stretch made 30% of that. |
retained-per-render | warn | A render kept 5 MB or more alive after a full collection. |
heap-filled-before | warn | A 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-growth | warn | RSS grew over 50 MB during the recording, and no kept memory explains it. |
loop-stall | warn | The event loop’s p99 delay was over 50 ms. |
Page data and islands
| Code | Severity | Raised when |
|---|---|---|
ogygia-cost | info | What ogygia’s handle added: its transform time, islands, holes and side channels. |
key-unread | warn | page.data keys no component reads, with what building them cost. |
seed-server-only | info | 2 KB or more of the seed is keys only the server renders. |
seed-whole | warn | An island reads page.data whole, so every key ships. |
seed-explainer | info | One seed key is 20 KB or more: who reads it. |
seed-large | warn | The page seed is over 100 KB. |
seed-devalue | warn | The seed left the JSON lane for devalue, naming the value that forced it. |
props-large | warn | Island props total over 200 KB. |
props-devalue | info, warn | An island’s props needed devalue. A warning from 2 KB. |
fp-unstable | info | An island’s fingerprint changed between renders because a prop did. |
html-held-open | warn | A streamed promise held the document open, and every island with it. |
dom-large | warn | The HTML makes 1,500 elements or more. |
img-unsized | info, warn | Images in the HTML have no width and height. A warning when the visit’s CLS is 0.1 or more. |
bfcache-no-store | warn | The page answers Cache-Control: no-store, so the back/forward cache never keeps it. |
hole-cache-cold | warn | A hole with a maxAge was asked for twice or more and never hit its cache. |
hole-cache | info | A hole’s cache hits. |
hole-uncached | info | Holes with no maxAge that take 20 ms or more a render. |
wake-inert | info, warn | An 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-crowd | info | One 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-heavy | warn | The page’s islands load 300 KB of JS or more. |
island-heavy-module | info | One module is 40% or more of an island’s own code, and 20 KB or more. |
island-barrel | warn | An 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-hydrated | info, warn | An 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-mismatch | warn | An island threw away its server DOM and rendered again, usually because something edited the HTML between the render and the wake. |
client-hydrate | info | The 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-read | info | An island reads a browser-only value while rendering. |
Page weight
Only on a build, where the page’s files are weighed.
| Code | Severity | Raised when |
|---|---|---|
js-at-start | info, warn | The page runs 150 KB of JS or more at start. A warning from 300 KB. |
js-lazy | info | 50 KB or more of island JS waits until it’s needed, when js-at-start didn’t fire. |
runtime-scripts | info, warn | Your browser loaded 10 KB or more of JS the HTML never names. A warning from 50 KB. |
duplicate-module | info, warn | A module ships twice on the page, 2 KB or more extra. A warning from 10 KB. |
render-blocking | warn | Three or more files, or 100 KB or more, must arrive before anything paints. |
css-unscoped | warn | A component’s styles shipped without their scope, so they apply to the whole page. |
assets-missed | info | Some files couldn’t be weighed (a 404, a timeout, or the time budget). weigh=full fixes the budget case. |
page-unweighed | info | The page couldn’t be weighed at all. |
Browser
Beside the codes from Page findings, a report raises these about its visits:
| Code | Severity | Raised when |
|---|---|---|
browser-vitals | info | The visit’s TTFB, LCP, CLS and INP next to the server render, when neither gap below applies. |
ttfb-gap | warn | TTFB was 2× the render or more, and 200 ms more. |
lcp-gap | warn | LCP came 500 ms or more after TTFB, and at least TTFB again. |
browser-limits | info | The visiting browser can’t report some measurements, so findings that need them are missing. |
other-screen | info | A visit on another screen size saw problems this one didn’t. |
other-browser | info | A visit in another browser engine saw problems this one didn’t. |