Repository navigation
Conversation
🔐 Codex Security Review
|
Giszmo
force-pushed
the
fix/dev-user-timing-sweep
branch
from
September 22, 2026 21:45
0e72af3 to
d685350
Compare
…ory growth React 19's development bundle records a performance.measure() entry with a serialized detail object for every component render (its "Components ⚛" DevTools track). WebKit keeps user-timing entries for the life of the page, outside the JavaScript heap, so a `tauri dev` session grows by tens of MB per minute while idle until WebKitWebProcess is OOM-killed. The production bundle never emits these entries, which is why release builds stay flat. Clear the measure buffer every 10 s in dev builds. Nothing reads a measure later; the sidebar boot measure reads its own entry synchronously. Fable 5.1 helped authoring this commit. Signed-off-by: Leo Wandersleb <leo@leowandersleb.de>
Giszmo
force-pushed
the
fix/dev-user-timing-sweep
branch
from
October 10, 2026 07:37
d685350 to
4fd960d
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
tauri devsessions on Linux grow by tens of MB per minute while idle until WebKitWebProcess is OOM-killed (13 GB anon RSS overnight, see #6272 for an earlier report). Release builds of the same commit stay flat.Cause
React 19's development bundle records a
performance.measure()entry with a serializeddetailobject for every component render (its "Components ⚛" DevTools track). WebKit keeps user-timing entries for the life of the page, outside the JavaScript heap, so nothing GC can free them. An idle dev session with one channel open held 185,974 measures after 17 minutes; heaptrack with WebKit debug symbols attributed the retained memory toPerformanceUserTiming::measure → SerializedScriptValue::create. The DOM, CSS rule count and JS heap were flat the whole time. The production bundle never emits these entries.Fix
Clear the measure buffer every 10 s in dev builds (
startUserTimingSweep, wired inmain.tsxunderimport.meta.env.DEV). Nothing reads a measure later: the sidebar boot measure infeatures/channels/hooks.tsreads its own entry synchronously. Marks are untouched; React does not accumulate those.Verification
Same commit, same machine,
tauri devwith#buzzopen, WebKitWebProcess RSS sampled every 10 s:pnpm typecheck,biome check, andpnpm test(6584 tests) pass.🤖 Generated with Claude Code