You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DevServer Hot Reload host: reconsider System.GC.Server (+ optional GCHeapHardLimitPercent) #24203
The Hot Reload host (Uno.UI.RemoteControl.Host) ships with "System.GC.Server": true in its runtimeconfig. For a long-lived background broker this hides collectable garbage until the OS commit limit is reached.
Measured (heavy Uno app, real EnC path): each hot-reload emit allocates ~70 MB of transient garbage for a ~150 KB metadata delta. With Server GC, gen2 stayed effectively frozen (0–1 collections) while the managed heap climbed monotonically by hundreds of MB. A forced gen2 GC reclaims the bulk instantly (the original reporter's gcdump reclaimed ~1 GB in one collection). So most of the growth is collectable garbage the GC feels no pressure to collect, and DOTNET_gcServer=0 cannot override runtimeconfig — users currently have no opt-out.
Proposal
Switch the host to Workstation GC (or at least make it configurable). Workstation GC applies pressure far sooner for this allocation pattern and bounds RSS.
Optionally set a heap limit. An absolute GCHeapHardLimit is hard to choose (client-machine dependent, low value = risk); prefer GCHeapHardLimitPercent with a generous bound so the GC compacts under pressure instead of letting the OS terminate unrelated apps.
Fast mitigation, not a root-cause fix — see companion issues on generators and workspace/connection lifetime.
Both asks are in — Workstation GC, plus the percentage-based heap limit the ticket preferred over an absolute one.
Walking the cached packages, this landed between 6.8.0-dev.87 (Server: true) and 6.8.0-dev.149.
Behaviour: 12 hot-reload emits against a running desktop app (12 × Found 1 metadata updates in the host log),
dotnet-counters on the host — committed heap 265 → 273 MB, working set 567 → 596 MB and plateauing, gen0 8 / gen1 3 /
gen2 0, 68 MB allocated total. No monotonic climb. gen2 staying at 0 is benign here since the heap isn't growing.
Activity
fix(devserver): memory-conscious GC profile for the Hot Reload host
khaskoul commentedon Sep 14, 2026
Verified fixed on
Uno.WinUI.DevServer6.8.0-dev.159 (Uno.Sdk 6.8.0-dev.39).Uno.UI.RemoteControl.Host.runtimeconfig.json(identical for the net9.0 and net10.0 hosts):Both asks are in — Workstation GC, plus the percentage-based heap limit the ticket preferred over an absolute one.
Walking the cached packages, this landed between 6.8.0-dev.87 (Server: true) and 6.8.0-dev.149.
Behaviour: 12 hot-reload emits against a running desktop app (12 × Found 1 metadata updates in the host log),
dotnet-counters on the host — committed heap 265 → 273 MB, working set 567 → 596 MB and plateauing, gen0 8 / gen1 3 /
gen2 0, 68 MB allocated total. No monotonic climb. gen2 staying at 0 is benign here since the heap isn't growing.