[MultiMine] MultiMineServer.isUsingBannedItem() causing TPS lagg
ThaDaVos opened this issue ยท 9 comments
I'm playing the RLCraft modpack (Minecraft 1.12.2) and I was experiencing big TPS drops when mining a block, after installing Spark-Forge and running a CPU profiler I think I found the cause and it's the MultiMine mod -> See screenshot
The link to the sparks results: https://sparkprofiler.github.io/#o19gsC0mqM
I removed the mod for now because of this.
Looking at the code I don't see why there's a need to Load and Save the configuration each time:
There is a cache map (you see it written in line 277), but for the first occurence i have little choice besides putting down a new entry in the config file.
I would say don't log them, leave it to the modpack dev to know what blocks and items to add. There are ways to find out what the id of the block you're looking at, or the item you're holding is already. No need to log it here.
Ok listen. I don't actually support 1.12 anymore, and this is directly caused by other mods rather than bugs, but you caught me in a giving mood.
I have pushed the 1.12 build to curse aswell.
For those who cant read the code: I added a config value to turn off the dynamic writing of unknown config values.
Thanks for the change @AtomicStryker -> What you mean you don't support 1.12 anymore? You're working on newer versions?
Just a curiosity question: why add them to the config file? If they are not mentioned there, then they are not banned, it's as simple as that (an alternative would be create the config file on load [Like most mods do as far as I know, or on a seperate thread but not every tick]) -> by loading and saving the config file everything time creates lots and lots of IO which is causing TPS lag -> on my server loading the config takes 15s, saving the same so 30s lagg for 1 tick