STYGION Optimize 0.5.3 (beta) for 1.21.1 NeoForge
Curse Maven Snippet
What's new
The server stops in seconds again instead of hanging until the panel kills it.
- A formed ECO Large Integrated Working Station no longer hangs the server stop (
ecoWorkstationUnloadGuard, on): in Neo ECO AE Extension 21.2.17 the station updates its own block while its chunk unloads, after vanilla has already saved the chunk and taken it out of the chunk map, so the chunk is loaded again from disk, the copy unloads the same way, and so on. In play that is a needless chunk load at every unload; at server stop the save loop waits for a chunk map without work that never comes. STYGION MC hung so at every stop on 29 Nov 2026 (chunk [216, 121], 15 minutes until the panel killed it). The station now checks that its chunk is loaded first, as every other block of the mod already does. A bug of neoecoae, fixed there in 21.2.18-beta2 (its issue #162); with that build the fix is left out as "not needed". Labtools/itest/stophang.mjs(labstop.yml): one region of the live world, vanilla against the fix. - A ceiling for the save loop at server stop (
stopUnloadLoopSeconds, 60 s, 0 = vanilla): vanilla waits without a limit until no world has chunk work left, and gives each chunk pass of that wait all the time there is, so a pass that waits on the main thread's own task queue never ends (the hang above was one such pass). Each pass now gets 50 ms and the queued tasks run between passes. After the ceiling one report goes to the log (what each busy world still holds, which chunks were loaded again during the stop and by whom), the chunks still waiting to unload are saved, and the stop goes on as vanilla: every loaded chunk is saved with a flush, the worlds are closed.
This mod has no additional files