@ogygia/devtools · Profiler
Reports
How a profile report is laid out and where to start. The first three fixes with what each is worth, the page score, the findings, and where each part of the report is explained.
A report reads from top to bottom. It starts with what to fix and what each fix is worth, then explains why the render took as long as it did, and ends with the raw numbers everything above was built from. Nothing is left out, and the order on the page is the order you’d read it in.
Every report starts the same way: a header (the page, the median render, how it was recorded, and whether the frames were sourcemapped), the row of actions, the page score and the summary figures. Then come eight numbered parts:
| Part | What it holds | Explained in |
|---|---|---|
| 1 · What to fix | What changed since your last profile, the three biggest fixes, the findings, the line-level breakdown, the slow patterns and forecast, the hot lines, the time breakdown, the page’s history, the paths. | Comparisons, First fixes, Slow patterns, Render timeline |
| 2 · Why it took this long | One render step by step: its phases, its waits, who waited for whom, and the other requests. | Render timeline |
| 3 · Memory | Who caused the GC, when the heap grew, and what a render keeps. | Memory |
| 4 · Hidden costs | Deoptimizations, sync I/O, promises per render, memo candidates and leftover timers. | CPU |
| 5 · The data | Who reads which page.data key, the seed, the document’s bytes and holes. | Page data |
| 6 · Islands and the browser | Your browser’s visit on one clock with the server, the islands, hydration, third parties. | Browser metrics |
| 7 · Network and waits | Every outbound call, and the waits HTTP doesn’t see. | Render timeline |
| 8 · The raw numbers | The CPU treemap, the component and function tables, the flame graph. | CPU |
Each finding and each pattern links to the row it’s about, so you rarely need to read a report in order.
Report kinds
The header says how the report was recorded, and some parts exist only for some kinds:
- page: a page profile. Several renders, so every CPU, GC and allocation figure is shown per render, with the median render as the headline. The only kind with the forecast’s measured caching figure, the cold render and the per-run columns.
- request: one request profiled with the
x-profileheader. One render; it carries a replay button. - window: a window over many requests. It opens with
window-requests, and its CPU covers everything in the window. - trap: a window the trap kept, labelled caught. Its timeline is the slow request’s, and it can be replayed.
A report on the dev server says so (dev-mode): its numbers include Vite’s own work.
First fixes
The first list under What to fix (after “since your last profile”, when there is one) is the three biggest fixes, each with the line to open and what it’s worth per render (“waits in a row, +page.server.ts:65, ~138 ms less waiting”). The line given is the one to change: for a thin wrapper that’s the caller that loops over it, and for a wait inside a helper it’s the line that called the helper. A leak big enough to take the server down (8 MB or more kept per render) is listed first, whatever the timings say.
The fixes follow the forecast’s order, and each says what a render takes once it and every fix above it are done: “waits in a row … → ~374 ms”, then “work for data nothing reads … → ~319 ms”, then “formatter per call … → ~269 ms”. You can decide where to stop by reading down the list. A fix another fix already covers isn’t listed again, and the one that covers it says “also covers”. Work for data nothing reads often shows up in several rows (the helper’s time, the load line it was inlined onto, the garbage it made), but it’s one deletion, so it points at the load line that fills the key.
The MCP digest (ogygia_profile) gives the same plan with the same running totals.
Page score
The score is one number from 0 to 100 with a grade: A from 90, B from 75, C from 60, D from 40, otherwise F. It measures what a visitor pays for, whatever built the page, so a page with no islands that ships 6 MB of JS scores low rather than 100.
| Category | What it measures | Scores 90 at | Scores 50 at | Weight |
|---|---|---|---|---|
| JS at start | Every script the page runs at start: its <script>s, each modulepreload, what an inline script imports, each module’s static imports, a Kit-hydrated page’s route code, and the islands that wake at load. Islands that wake later count apart, as “on demand”. | 150 KB | 700 KB | 30 |
| Server render | The median render time. | 50 ms | 300 ms | 15 |
| Hydration integrity | Islands that threw away their server HTML, never woke, or changed their markup as they woke. Only on a page with islands, once the browser reported. It’s 100 × e^−(0.45 per recovered island + 0.35 per island that never woke + 0.12 per changed one). | none | none | 15 |
| Loading | LCP (60%), FCP (25%) and TTFB (15%) from the visits. | 1.2 s, 0.9 s, 200 ms | 2.5 s, 1.8 s, 800 ms | 10 |
| Data shipped | The page seed, island props, remote seed, and inline script text. | 15 KB | 150 KB | 10 |
| Page weight | Every byte on the wire at start, the HTML included. | 400 KB | 1.6 MB | 10 |
| Responsiveness | INP and total blocking time from the visits. | 100 ms, 100 ms | 300 ms, 400 ms | 10 |
| Render-blocking | Stylesheets and sync scripts in <head>: their bytes, and a round trip for each. | 25 KB | 150 KB | 5 |
| HTML document | The size of the HTML. | 80 KB | 500 KB | 5 |
| Visual stability | CLS from the visits. | 0.05 | 0.2 | 5 |
Each category maps its value onto the log-normal curve Lighthouse uses, set by the point where it scores 90 and the point where it scores 50. Every byte and millisecond moves the number, and nothing falls off a cliff. Each bar shows the points the category cost and its biggest contributors (for JS, the largest files, and what the build put in each).
A category with no measurement is left out rather than given a free 100, and the weights of the rest are scaled up. The card says which categories are missing and why. Two cases matter in practice:
- On the dev server the page isn’t weighed, because Vite serves modules one by one and says nothing about a build. Profile a build to get JS, page weight and render-blocking.
- Before any browser visit, loading, stability, responsiveness and hydration are left out. Open the page while logged in to the profiler and the visit fills them in. That works on every page, including one that never boots the ogygia runtime (a Kit-hydrated
csr = truepage, or a page with no island), because the script that reports the visit is inline in the document (Visit reporting).
JS at start carries the most weight either way. A visit runs on your own machine, where parsing and running JS costs a fraction of what a visitor’s phone pays, so the weighting keeps a clean visit on a fast laptop from hiding a heavy bundle.
With a browser visit, JS at start also counts scripts the HTML never names but the browser ran before the load event: scripts loaded by other scripts (a tag manager’s tags, a library from a CDN fetching its parts), and islands that wake when visible and were on your first screen. An island you scrolled to later doesn’t count.
The dashboard’s Pages over time draws each page’s score beside its render. The JSON carries the score as score and the weighed files as assets (the totals, the 40 largest files, and what couldn’t be weighed). @ogygia/testing’s toMeetBudget({ score }) fails a test below a score.
Findings
Under the score, the findings list what’s wrong, warnings first. Each says what to do and where. A warning about a repeated component (”HeavyRow rendered 800 times”) carries the fix (render fewer, or move it into a deferred hole), the file, and a show the row link that opens that component’s row with its call stacks. A finding that a slow pattern already explains links to that pattern’s card, so the two read as one problem.
Every finding has a stable code, so a script, a budget’s fail_on or a test can match it. Findings lists every code with what triggers it and its threshold. The findings that start with “In the browser:” come from your browser’s visit and are the same as the dock’s page findings.
Keyboard
Everything on a report that takes a click also works from the keyboard. Tab reaches each table row, sort header, timeline block and seed row, and Enter or Space activates it. A focused timeline block shows the same detail a hover would, and a sort header tells a screen reader its order. The CPU treemap and the flame graph are pictures of data the tables also list, and the flame graph’s search box zooms to the heaviest match when you press Enter.
Common slow shapes
Most slow pages look like one of these:
- Waiting, not computing. The time breakdown is mostly idle, CPU is low and wall time is high. The answer is in the network waterfall, or in waiting by function for files and timers. A driver the profiler can’t see into reads as “nothing recorded”; name it with a span.
- One heavy component. A single large box in the treemap, and that component tops the table sorted by self.
- A thousand small cuts. The treemap is a field of small boxes of one colour. Sort the components by total to find the parent that renders them all.
- Allocation pressure. GC is a visible slice of busy time, and who caused the GC names the line.
Moved sections
This page used to explain every part of a report. Each part now lives on the page for its topic:
- Since your last profile, in Comparisons
- Comparison and history, in Comparisons
- Line-by-line comparison, in Comparisons
- Site-wide fixes, in Comparisons
- Site view, in Comparisons
- Hole statistics, in Comparisons
- Slow patterns, in Slow patterns
- The forecast, in Slow patterns
- The forecast (short address), in Slow patterns
- Hot lines, in Slow patterns
- Unused data, in Slow patterns
- Shared callers, in Slow patterns
- Time breakdown, in Render timeline
- Critical path, in Render timeline
- Line-level breakdown, in Render timeline
- Load waterfalls, in Render timeline
- Causality graph, in Render timeline
- What if, in Render timeline
- Raw samples, in Render timeline
- Render sequence, in Render timeline
- Network, in Render timeline
- Upstream Server-Timing, in Render timeline
- Nested traces, in Render timeline
- Waiting by function, in Render timeline
- Concurrent requests, in Render timeline
- Cold starts, in Render timeline
- Per-run variance, in Render timeline
- Instance aging, in Render timeline
- Profiler overhead, in Render timeline
- CPU by self time, in CPU
- Components, in CPU
- Render counts, in CPU
- Hot functions, in CPU
- Flame graph and raw profile, in CPU
- Deoptimizations, in CPU
- , in CPU
- Memory, in Memory
- GC attribution, in Memory
- Heap growth, in Memory
- Retained memory, in Memory
- Leftover allocations, in Memory
- Heap pressure, in Memory
- Data lineage, in Page data
- Data river, in Page data
- Page seed, in Page data
- Oversized island data, in Page data
- Document bytes, in Page data
- Holes, in Page data
- Framework overhead, in Page data
- End-to-end timeline, in Browser metrics
- Browser vs server, in Browser metrics
- What went wrong in the browser, in Browser metrics
- Third parties, in Browser metrics
- The browser's CPU, in Browser metrics
- Islands, in Browser metrics
- Island cost heatmap, in Browser metrics
- DOM time travel, in Browser metrics
- Custom spans, in Custom spans
- Values, in Custom spans
- instrument, in Custom spans
- mark, in Custom spans
- Request replay, in Recording
- Standalone HTML, in Report storage
- Builds without source maps, in Production