Index global regions by type, identity, name, and chunk#560
Index global regions by type, identity, name, and chunk#560frostdev-ops wants to merge 1 commit into
Conversation
89983f6 to
1ca226f
Compare
|
I've found a couple cases where lags happen, notably if you have hundred if not thousands of celestial objects. Those are already fixed in the main branch. I suggest you rebase your branch and measure where the lag actually happen, then we'll see if there's more that needs to be done on the manager optimisation. |
1ca226f to
af70e87
Compare
|
Rebased onto current MC1.12 (includes 48eb5d9). Honest status: the lag I was chasing was on a heavily modded production world at the same time as the celestial map validation lag you've since fixed, so right now I can't attribute any of it to Also aware that if we do keep it, the full |
Experimental motivation
Common global-region lookups repeatedly scan every registered region even when callers ask by type, UUID, name, or a covered chunk.
Scope
GlobalRegionManagermaintains derived indexes for type, UUID, name, and covered chunks. Every registry mutation, cleanup pass, and NBT load rebuilds the indexes. Null region types are rejected before registration/indexing. Celestial-object and gravity caches are excluded.Evidence and limitations
test NO-SOURCE).Manual testing pending
Parity for name, UUID, type, nearest/containment, chat, block-update, cleanup, and NBT reload paths.