Conversation
Keep worker nursery pacing separate from the full-heap growth target. Track a conservative managed bound at collection boundaries, preserve the full-only OOM decision, and drive queued verification while a worker is idle. Add cadence and retained-Eden regression coverage and the matching immediate-timer adapter to both Bun qualification paths.
Keep the post-full allocation target at most twice the current heap ledger, subject to the existing collector minimum and smaller pressure-driven targets. Apply the ceiling after opportunistic target reuse and reduce the derived Eden allowance only when necessary. Preserve the separate configured nursery cap, checked worker accounting, first-full initialization, strict full-only OOM predicate, and mandatory verification progress. This is a bounded follow-up experiment after the initial generational cadence change reduced CPU but increased retained memory and regressed messaging wall time. The new growth ceiling has source-only P2 review; native and performance qualification remain pending.
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.
Worker heap limits currently force the next automatic collection to be full and collapse the whole-heap growth target to the nursery allowance. Repeated maintenance and allocation requests consequently retrace large surviving code graphs instead of using young-generation collection.
Separate full-heap growth from nursery pacing. The revised candidate bounds budgeted workers' post-full target to twice the full heap ledger, retaining the collector minimum and any smaller existing target. This also bounds opportunistic target reuse. The configured nursery cap remains separate; the derived Eden allowance can decrease with the full target. A conservative managed-memory estimate requests full verification when the hard old-generation budget may be exhausted. Only the existing strict post-full survivor check reports OOM, and the checked full-collection buffer snapshot preserves ArrayBuffer exclusion through Eden collections.
Mandatory verification drives its existing collection ticket while idle, even when the optional stop timer is disabled. Both qualification paths include the matching Bun immediate-timer wake adapter. Cached-data semantics, source/referrer identity, debugger behavior and public accounting APIs retain their existing contracts.
The earlier candidate
ecf43f247passed the native stress/module, sampling, ArrayBuffer, stack and cache gates, plus exact-head fork checks. Four-process-per-arm measurements on eight CPUs/four Vitest workers then found providers wall time down 7.4% and CPU down 21.5%, with RSS up 28.4%; messaging wall time regressed 2.4%. Those results do not qualify that version for landing. The new growth ceiling at32804d651e88b0667cf9831dc8bbe7eb250bc3c1addresses a measured retention/headroom concern: full-traced heap maxima did not increase in the diagnostics, while surviving SourceProviders did. Logical source ranges are not physical-byte or RSS accounting, so no complete allocation breakdown is claimed.Current-head status: isolated P2 source review is clean; native build/runtime checks and fresh performance qualification are pending. No current-head speedup or memory improvement is claimed. The existing frozen-candidate matrix continues unchanged to preserve its CPU/worker-shape evidence. The earlier failed real-clock fixture observation remains preserved; its separate deterministic test repair landed in openclaw/openclaw#165661. No GC marker policy is adopted.
Main-line companion #15 remains on the earlier candidate until the revised policy qualifies. Bun timer companion: openclaw/bun#129. This draft does not request artifact publication.