9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-25 09:59:15 +00:00
Files
Leaf/patches
DGun Otto d7fcb32bae Reduce worldgen allocations by reusing supplier objects (#68)
* Reduce worldgen allocations by reusing supplier objects

This change optimizes the way SurfaceRules update their biome supplier,avoiding unnecessary object creations and thus reducing memory allocations
during world generation. The update method now reuses the existingPositionalBiomeGetter object if it's already present, otherwise it
initializes a new one.

Additionally, the tryApply method in SurfaceRules now avoids iterator
allocation by directly accessing the rules list, which further contributes
to reducing garbage collection pressure during world generation.
2024-06-14 23:53:47 +08:00
..
2024-06-14 21:22:55 +08:00