Files
Iris/core
piexel 7f34bb917f Hold pregen back when the mantle or the heap is full
Ported from Iris v4's mantle backpressure. Before each chunk the
pregenerator now:
- evicts idle tectonic plates and waits while more plates are loaded
  than the heap-scaled budget allows (pregen.maxResidentTectonicPlates)
- pauses between 92% and 82% heap, requesting a GC because a paused
  pregen allocates too little for the collector to run on its own; if
  the heap stays full, the JVM's diagnostic GC runs at most once a
  minute, which also works with -XX:+DisableExplicitGC
Both waits give up after pregen.mantleBackpressureTimeoutMs so a stuck
heap cannot hang the pregen. Unlike v4, a reclaim starts anywhere above
82% instead of only at 92%, since a pregen waiting at 89% otherwise
never triggers one.

Outside pregen, the engine service shortens the mantle keep-alive as
the heap fills and trims studio worlds once the heap is critical.

The mantle itself:
- concurrent requests for a plate that is still loading share one load
  instead of each holding an IO thread
- plate retries stop once the mantle is closed or the thread is
  interrupted, instead of recursing forever
- trim(0, 0) evicts plates idle for 500 ms instead of 4 s

Model used: Claude Opus 5.5
2026-10-15 00:26:33 +02:00
..