Skip to content

AtlasSpigot 26.2 - build 22 (chunk patches + reproducible builds)

Choose a tag to compare

@AtlasStudioMC AtlasStudioMC released this 06 Sep 00:52

Rebuilt jar with two more optimisation patches — nine non-branding patches total — plus a fix for how the patches are maintained.

New: the chunk load/unload path

This is one of the highest-frequency operations on any server with players moving around, and four sites on it were doing Bukkit work nothing consumed.

callEntitiesLoadEvent / callEntitiesUnloadEvent streamed every entity in the chunk through Entity::getBukkitEntity, collected them into a new list, then built a CraftChunk and an event. getBukkitEntity() creates the CraftEntity wrapper when one doesn't exist — so this was forcing wrapper allocation for every entity in every chunk that loaded. Both methods return void. With no listener registered, all of it was built and thrown away.

ChunkLoadEvent is notification-only; its CraftChunk is now built lazily, since the populator path is the only other consumer.

ChunkUnloadEvent was constructed purely to read isSaveChunk() back off it.

That last one would mean chunks silently not saving if it were wrong, so it isn't an assumption: the event is constructed with saveChunk = true, and only a listener can call setSaveChunk(). With none registered, isSaveChunk() is definitively true and mustNotSave definitively false. Also checked empirically — this build produces the same world output as build 21 without the patches, including after an explicit save-all.

Also: the patches are now reproducible

The .diff files in source-patches/ are written to be read — they have no valid hunk headers, and git apply rejects all of them. That was fine with five branding patches. At fourteen it meant every rebuild was hand-work, and hand-work drifts.

The generated source trees are gitignored upstream, so there's no tracked baseline to diff against and no real patch file to produce. source-patches/apply.py is the answer: anchored replacement with an assertion on every anchor, so it either applies cleanly or names exactly which anchor upstream moved.

./gradlew applyAllPatches
python3 source-patches/apply.py .
./gradlew :leaf-server:createPaperclipJar

Verified end to end on a clean clone — all thirteen groups applied, result compiled.

Not measured

All nine patches are strictly-fewer-allocations and provably equivalent. No performance figures are claimed. 26.2 was benchmarked against Paper and the result was too noisy to publish — see results-26.2.txt.

Config: unchanged from build 17

⚠️ Still maximum tuning. hopper.disable-move-event is on, so shop, sorting and economy plugins will not see hopper transfers (set false in config/paper-world-defaults.yml to restore). Spawner mobs have no AI, monsters despawn at 28/48, mob caps cut ~43%, simulation distance 3.

Verified

Boots clean reporting AtlasSpigot version 26.2-DEV-ver/26.2@e51867d, zero exceptions or errors, saves and shuts down cleanly, still zero net/minecraft classes.