TerraBlender (Fabric)

TerraBlender (Fabric)

19M Downloads

Performance issue caused by NamespacedSurfaceRuleSource

racoonman2 opened this issue ยท 8 comments

commented

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)
image

commented

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

commented

Hi, the guy who did that test here. I've also done the same thing for Terrablender with Regions Unexplored (which had a surface rule problem on their own which they solved in RU 0.5.5)
Here are those results.

image-39

commented

This is also an issue in 1.20.1

commented

It's an Issue on all Terrablender versions as far as I can tell.

commented

Based on this someone made a fix? If so why not open a pr for it

commented

Please resolve this. Any biome mod that depends on this mod is unusable and slows chunk loading to a snail's pace.

commented

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

commented

The diminution in performance is pretty noticeable, especially in big modpacks. Are the devs working on a fix?