Refined Storage Auto-Crafting Doesn’t Cancel and Causes High CPU Usage ATM 10
Closed this issue · 2 comments
Describe the bug
I'm currently playing All the Mods 10 (version 3.0) and have noticed what seems to be a bug in the latest version of Refined Storage.
Setup:
- Modpack: ATM 10 v3.0
- Storage System: Refined Storage (version: neoforge-2.0.0.beta.2)
- Extra Disks version 4.0.11
- Extra Storage version 5.0.2
- Issue Trigger: Attempting to auto-craft high-capacity storage parts (1048m)
My Setup
- AMD Ryzen 9 9950X
- 2x Corsair Dominator Titanium RGB weiß DIMM Kit 64GB, DDR5-6400
- GIGABYTE X870E AORUS Pro ICE
What happens:
I’ve created multiple Auto Crafters and added all the necessary patterns for the 1048m storage part. When I select that item in the crafting terminal, Refined Storage begins calculating the resources needed. But the problem is:
- It feels like the calculation time increases exponentially based on the steps.
- At the 1024k and above, the crafting preview starts to take extremely long to load.
- During this process, I can see that one CPU core is maxed out (100%), and it stays that way.
- Server Core 2GHz, PC 5.5-5.7GHz both running on 100% after the click
- When I click Cancel or press ESC, the crafting preview closes, but the CPU usage remains at 100%.
- If I try again, a new core gets maxed, and this continues.
Diagnosis:
I used Spark and Observable to trace the performance hit.
Observable shows that one Auto Crafter is especially overloaded. It’s the one I use for refilling shared items, like the Matrix from Neutral Networks.
My theory is that the crafting calculation tasks never get properly cancelled or cleaned up, so each attempt adds to the total CPU load permanently.
Note:
Sorry, I don’t really use GitHub.
If anyone needs the world file or more details about this bug, feel free to message me if that’s even possible on GitHub.
I hope it's detailed enough.
How can we reproduce this bug or crash?
- Set up like 7 Netherite Crafters.
- Insert a large recipe, such as the 1048M storage part, into the crafters.
- (Most of my ingredients are generated via Mystical Agriculture.)
- Open the crafting grid/terminal, search for the storage part, and click the craft icon.
- Now wait Refined storage and it the background you can see that one of your cores will have a huge usage spike or even take the hole core.
- Note: I didn't test how long it actually takes Refined Storage to finish calculating the process. I gave up after about 8 minutes.
- You can repeat this as many times as you want, and each time it will use a new CPU core. I think the limit is around 4 cores at 100% usage based on my testing.
What Minecraft version is this happening on?
Minecraft 1.21.1
What NeoForge or Fabric version is this happening on?
NeoForge
What Refined Storage version is this happening on?
2.0.0.beta.2
Relevant log output
Hello @Yoni31, thanks for your detailed report.
I've updated it so that cancelling from the UI now properly cancels the task, and should no longer use up your CPU.
Also, long-running calculations are auto-killed now after 5 seconds.
Regarding the autocrafting performance itself, read my message here: #980 (comment)