Findings
For AI agents: this page is Markdown at https://squiggle.sh/docs/performance/findings.md. Every docs page is listed at https://squiggle.sh/llms.txt, and all of them are one file at https://squiggle.sh/llms-full.txt.
Detectors read each session and report what they find: what went wrong in plain words, the source line it points at, and the recorded data it came from. Pick one to see a finding as Squiggle reports it.
PriceTicker rendered 48× in one interaction
- Where
src/screens/Markets.tsx:41- Evidence
- 48 commits after one tap on Markets, each linked to its render row
propose_fix → your coding agent
PriceTicker reads the whole prices store, so every tick renders it. Select only the price it shows, then re-run the flow to confirm the finding is gone.
What a finding tells you
- A title that says what happened, with the numbers: “PriceTicker rendered 48× in one interaction”.
- Where: the file and line of the component, or the request or query it is about.
- Evidence: the renders, requests or metrics it was worked out from, so you can check it rather than take its word.
- A severity:
info,warnorerror.
Running the detectors again updates a finding instead of adding a copy.
The detectors
Seventeen detectors look at performance. The limits below are the defaults.
| Detector | Reports |
|---|---|
render-storm | A component rendering more than 15 times in one interaction, or 60 times in one second. |
memo-miss | Five or more re-renders where every changed prop was a new object, array or function with the same contents. When the re-renders started higher up, it names the component that set them off and why: its own state, a context change or a forced update. The props are recreated there or in a component under it, so that’s where to look. Fix with useMemo or useCallback. In an app React Compiler builds, which memoizes those already, it points you at where the value comes from instead: a hook or library that returns a new value each render, or a component the compiler skipped. |
context-blast | Twenty or more components re-rendering from one context change within 200 ms, at least twice in the session. |
long-task | A JS task over 100 ms, with what the CPU was doing at the time. Stalls are grouped by the screen they happened on and the component whose render they ran in, so a stall that repeats is one finding with a count, in a session and across sessions. When the stall was profiled, the title names the function: JS thread blocked 484ms in useCartTotals on perf (profiled). Time Squiggle itself spends on the JS thread is left out, such as the moment it holds your app while it attaches the debugger at launch: the finding counts only your app’s part of a stall, a stall whose app part is under 100 ms is not a finding, and the timeline in Studio labels it Squiggle (held JS). |
jank-attribution | Dropped frames or a frame-rate dip, with the work around it ranked as suspects. |
js-driven-motion | An animation driven from JS: one component committing 20 or more times a second for at least a second while the main thread runs at twice its idle rate. It freezes whenever JS is busy, so move it to the native driver or the UI thread. |
idle-periodic-work | Work your app repeats on a beat while nobody touches it: a component re-rendering every second, a request polled every few seconds, or a long task on a timer. It looks only at stretches of at least 5 seconds that start a second after the last touch, scroll or screen change, and needs at least 5 beats at least 200 ms apart. It names the period, the component and its source line, or the request. A setInterval, or a setTimeout of 100 ms or more that the app re-arms, is named by the line that scheduled it and the period it asked for, such as a setInterval (anonymous at src/app/idle-lab.tsx:18:27, declared every 1000 ms) fires every 1.01 s, with the components it re-renders and the long tasks it runs folded in; in a release build the line is left out. On an iOS simulator it also names an animation that repeats forever, such as a spinner, when it runs through an idle stretch, by the view it runs on and its testID, and says when it runs where no one can see it (hidden, faded out or off the screen): animations of contents, contentsMultiplyColor on UIImageView (testID idle-spinner) repeat every 800 ms while the app is idle, where no one can see it. Each beat costs battery while the user only looks, so stop the timer while nobody is using the screen, or when it is out of view, and stop a spinner when its content has loaded rather than only hiding it. |
periodic-jank | The JS thread blocks on a beat: five or more long tasks that repeat at one period. It names the period and, when at least 80% of the beats begin just after something Squiggle recorded, that cause: a timer, with the line that scheduled it in a debug build, a request polled in step, or a Hermes garbage collection. Without one, it says nothing recorded locks to the beat, so the cause is a hypothesis. To check that a timer it names really causes the beat, run squiggle flow <flow> --confirm-jank: it runs the flow, mutes that timer in your app (a debug build), runs the flow again, and says confirmed when the beat is gone. A beat like this is usually a timer doing too much at once: split its work, move it off the JS thread, or run it less often. |
duplicate-request | The same request twice within three seconds. |
waterfall-request | Three or more requests in a row, each waiting for the last, over 500 ms in total. |
oversized-response | A response over 2 MB. |
slow-ttfb | A request waiting over a second for its first byte. |
slow-query | A SQLite statement over 20 ms at the 95th percentile (100 ms for a transaction), or one run over five times that. |
heap-growth | Memory that grows on every visit to the same screen, over three or more visits, by more than 5 MB of JS heap in total (20 MB of memory when the JS heap isn’t sampled). |
startup-regression | A startup phase more than 25% and 50 ms slower than in the baseline. |
nav-loop | The same two screens or requests repeating four or more times, more than your other sessions ever do. Needs 20 stored sessions. |
heavy-render-window | Half a second with more rendering than your app absorbs: the level is learned from your other sessions, where at least 80% of windows above it dropped frames. Needs 20 sessions with frame samples. |
Two levels come from your budgets when .squiggle/config.jsonc declares a "*" entry. waterfall-request then reports a chain longer than its waterfallDepth, and jank-attribution a moment that dropped more frames than its droppedFramesPerInteraction. With the defaults squiggle init writes, that is a chain of three requests and three dropped frames. See Set a budget per screen.
Rage taps, dead zones and confusion are found the same way; see Friction and the journey.
In Studio
Findings are on the Performance screen’s Insights section. While your app is connected, Studio runs the detectors every few seconds, counts the findings on its card, and sends one notification for each new problem.
Click a finding’s evidence to highlight the request in the network list, select the component in the Inspector, or open its line in your editor.
Timeline, resources & insights
In the terminal
squiggle perf insightsinsights 4 · session mv6rxxns-1 ▌ long-task JS thread blocked 484ms — js_long_task ▌ jank-attribution UI fps 38.7 — top suspect: NavigationContentsquiggle perf watch follows the store and prints each new finding once, as the detectors produce it.
Have your agent fix one
The propose_fix tool turns a finding into a plan for your agent: the component’s code, what the detector measured, and a fix worded only as firmly as the evidence allows. It never edits a file. Your agent makes the change as a normal edit you can review, then runs the flow again to check the finding is gone.
To choose which to fix first, call propose_fix { rank: "saving" }. It lists up to five of your components with memo-miss and render-storm findings, ranked by the render time a fix would save: the renders it removes times what one render of that component costs. A component Squiggle has no render time for is left out. Each saving is a prediction. After the edit, run the flow again and pass measure: { prediction, after } with the new session to record what the fix really saved.
It refuses a finding that names no component (a long task or a duplicate request), a component inside node_modules, and a file it can’t find on your Mac.
See which detectors matter for your app
squiggle perf detector-stats compares flow runs that failed an assertion with runs that passed, and shows how often each detector fired on each:
squiggle perf detector-statsdetector fires on failed fires on clean liftlong-task 33 (37.5%) 335 (11.2%) 3.34×jank-attribution 31 (35.2%) 496 (16.6%) 2.12×render-storm 11 (12.5%) 385 (12.9%) 0.97×