Skip to content

AtlasSpigot 26.2 - build 23 (ten optimisation patches)

Choose a tag to compare

@AtlasStudioMC AtlasStudioMC released this 06 Sep 01:00

Rebuilt jar — ten optimisation patches now.

New: the universal entity-removal path

CraftEventFactory#callEntityRemoveEvent sits in Entity#setRemoved, the single path every entity takes on its way out of the world: mob deaths, item and XP orb despawns, projectiles expiring, entities dropped when a chunk unloads.

It returns void, and getBukkitEntity() creates the CraftEntity wrapper when one doesn't exist — so with no listener registered it was allocating wrappers for entities that were already leaving.

This config makes it hotter than a default server, deliberately: monsters despawn at 28/48, items and arrows at 15 seconds. High removal rate is the point of that tuning, which makes the allocation on that path worth removing.

Two I rejected

PlayerNaturallySpawnCreaturesEvent allocates per player per tick during the spawn phase — an obvious-looking win. It isn't: the event is stored on the player, and both consumers in ChunkMap treat a null event as "skip spawning for this player entirely." Skipping construction would silently disable mob spawning. Making it safe means restructuring three files to fall back to the computed radius, which is not worth one small allocation.

callPrepareResultEvent is void, but calls setItem and broadcastChanges afterwards using values read off the event, so those side effects must still run.

Both are recorded in NOTES so they don't get re-examined.

Not measured

All ten patches are strictly-fewer-allocations and provably equivalent. No performance figures are claimed — 26.2 was benchmarked and the result was too noisy to publish (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 in 13.72s reporting AtlasSpigot version 26.2-DEV-ver/26.2@e51867d, zero exceptions or errors, save-all completes, clean shutdown. Still zero net/minecraft classes.

Rebuild it yourself: ./gradlew applyAllPatches && python3 source-patches/apply.py . && ./gradlew :leaf-server:createPaperclipJar