Performance issue caused by NamespacedSurfaceRuleSource
racoonman2 opened this issue ยท 8 comments
What's the issue you encountered?
Performance is noticeably slower with TerraBlender, even when no other mods are installed. It seems this is due to NamespacedSurfaceRuleSource calling context.biome.get() for every non empty block in the chunk, while this only happens along the surface in vanilla. This could be fixed by grouping surface rules into a single sequence instead of having them be registered per biome namespace.
How can the issue be reproduced?
Create a world with TerraBlender installed
Logs
No response
Mod Version
1.20.2
Additional information
Heres some quick tests done by someone in the TerraForged discord. They arent perfect, but they still demonstrate the performance differences pretty well (note that the fix column refers to TerraBlender with it's surface rule api disabled)
To clarify, the version of TerraBlender used in the fix was modified to still work with Regions Unexplored's surface rules, so the world gen is still the same as normal TerraBlender regardless of the surface api being disabled
Please resolve this. Any biome mod that depends on this mod is unusable and slows chunk loading to a snail's pace.
Gosh took me a while to find what mod was suddenly causing us slowdown. Glad this was already found reported. Hope it gets fixed soon