Decide whether one loader may run another refinement pass.
Two rules, both from measured bytes:
a HARD STOP once tracked residency is already at or past the ceiling, and
a PREDICTIVE stop when the next rung would cross it.
Rule 2's input comes from estimateNextRungBytes, which under-estimates
on purpose for the ladder shape that actually hurts. A geometric ladder may
cross the ceiling by one level before its pass stops. Over-estimating here
would stop equal-count ladders several rungs early, degrading scenes that
were never in danger. That one-level overshoot is bounded only while ONE
step at a time is admitted on this estimate; the concurrent refinement loop
(B9c) is held to it by RefinementResidencyBudget.admit's in-flight rule.
Production construction supplies a device-class fallback when
performance.memory is unavailable, so Firefox and Safari are budgeted too.
The non-positive branch is defensive for direct callers that explicitly supply
no usable budget; it admits everything rather than treating invalid input as
exhausted capacity.
Decide whether one loader may run another refinement pass.
Two rules, both from measured bytes:
Rule 2's input comes from estimateNextRungBytes, which under-estimates on purpose for the ladder shape that actually hurts. A geometric ladder may cross the ceiling by one level before its pass stops. Over-estimating here would stop equal-count ladders several rungs early, degrading scenes that were never in danger. That one-level overshoot is bounded only while ONE step at a time is admitted on this estimate; the concurrent refinement loop (B9c) is held to it by
RefinementResidencyBudget.admit's in-flight rule.Production construction supplies a device-class fallback when
performance.memoryis unavailable, so Firefox and Safari are budgeted too. The non-positive branch is defensive for direct callers that explicitly supply no usable budget; it admits everything rather than treating invalid input as exhausted capacity.