Harden lazy reload restart guard

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
brennanb2025
2026-06-24 13:00:58 -07:00
co-authored by Orca
parent c961043c39
commit 00be2d4255
@@ -6,6 +6,8 @@ import { getBrowserWebviewMemoryProfile } from '../components/browser-pane/webvi
const RENDERER_MEMORY_SAMPLE_INTERVAL_MS = 60_000
const BYTES_PER_MEGABYTE = 1024 * 1024
// Why: recover only after sustained high heap usage, avoiding reloads for small
// heaps or one-off spikes while still acting before likely renderer loss.
const CRITICAL_HEAP_USAGE_RATIO = 0.85
const CRITICAL_HEAP_MIN_MB = 512
const CRITICAL_HEAP_SAMPLES_BEFORE_RELOAD = 2