Skip to content

Dev Build 1.21.1 (62639f1)

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 20 Jul 22:24

UNOFFICIAL automatic development build from 1.21.1 branch.

Commit: 62639f1
Message: fix(structures): kill quadratic merge and racy lazy init in structure data loading

Loading a dimension's structure data froze the server thread for ~58s on a
240k-structure world.

mergeRegionData allocated a full HashSet copy of the accumulated output map
for every duplicate structure key, just to recover the stored key instance
HashMap won't return - 183M entry copies and ~12GB of garbage per load.
Track the stored key in a parallel canonical-key map instead, O(1) per
structure. Replaying both algorithms over real region files gives identical
results in BO3 and BO4 modes.

getStructureCache had an unsynchronized lazy init while decoration runs on
many chunk gen threads, so up to six threads each loaded and parsed every
region file in parallel. Double-checked lock, without serializing the
decoration hot path.