Mrbysco / AgeingSpawners

Spawners with a limit
https://www.curseforge.com/minecraft/mc-mods/ageing-spawners
MIT License
0 stars 2 forks source link

[Bug]: The game's performance can be significantly affected when the Ageing mode lists contain too many entries. #5

Closed Kasualix closed 10 months ago

Kasualix commented 11 months ago

General Info

Forge version

Any supported version of this mod

Minecraft version

Any supported version of this mod

Mod version

Any supported version of this mod

Java version

Any supported version of this mod

Issue Description

Title. To be specific: https://github.com/Mrbysco/AgeingSpawners/blob/1.19.x/src/main/java/com/mrbysco/ageingspawners/util/AgeingHelper.java#L11

Possible solution: Pre-initialize and cache the result

A long time ago I was working on a modpack. When I added a lot of entries to this mod's config file, the game became laggy because of the spawners. I haven't reported the problem since, and only recalled it when I recently solved this performance problem (and improved by 100+ fps) at Embeddium Extras

Additional Information

No response

Kasualix commented 11 months ago

Image_1697911356900 some details