Huge TPS hit with large crafting orders.
eyeonus opened this issue ยท 3 comments
Issue description:
The current, serialized nature of crafting causes huge TPS lag when making large crafting orders.
This /MAY/ only be for processing recipes, haven't noticed it with crafting recipes.
What happens:
When ordering, for example, 1024 glass, the crafting system creates 1024 crafting instances of smelting sand into glass, which I imagine in turn causes 1024 checks per tick.
The effect this causes is easily seen when looking at the progress indicator of an Extra Utilities 2 Crusher with the full 20 speed upgrades. I originally mistook it for framerate issues, but at the time my framerate was doing fine.
This is somewhat mitigated by making the recipe "64 x becomes 64 y" instead of "1 x becomes 1 y", but then the shift functionality of the pattern item is lost, and it still shows each individual item in the crafting monitor.
What you expected to happen:
The crafting system determines the total number of things being requested, down to the raw materials (, which it does seem to do already), so for example 12 sticky pistons requires:
12 ore:slimeball,
36 ore:plankWood (= 9 ore:wood),
48 cobblestone,
12 redstone
12 iron ingot (= [4,6,12] iron ore (mod dependent))
and then crafts, from the bottom up, the full amount of each item needed as a single crafting job. (All planks and ingots crafted if needed first, then all pistons, then finally all sticky pistons.)
Steps to reproduce:
- Order a large quantity (, 2048 is definitely high enough,) of something.
- Check the TPS rate.
Version (Make sure you are on the latest version before reporting):
- Minecraft: 1.10.2
- Forge: 12.18.1.2094
- Refined Storage: 1.1.3
Does this issue occur on a server? [yes/no] yes
Other notes:
The indented sub-process thing is pretty cool. It would be nice if it was a per job thing, though, not a per item one. Partly to fix this issue, and partly to save on scrolling through the monitor.
Proposed per job:
Job | Complete |
---|---|
Sticky Piston | 0/12 |
-Piston | 8/12 |
--Iron Ingot | 8/12 |
--Oak Wood Plank | 32/36 |
Current per item:
Job | Complete |
---|---|
Sticky Piston | |
-Piston | 88% |
--iron ingot | 75% |
Sticky Piston | |
-Piston | 66% |
--Oak Wood Plank | 75% |
Sticky Piston | |
Sticky Piston | |
-Piston | 88% |
--Oak Wood Plank | 0% |
Sticky Piston | |
-Piston | |
--iron ingot | 50% |
Sticky Piston | |
-Piston | |
Sticky Piston | |
-Piston | 88% |
--iron ingot | 50% |
Sticky Piston | |
-Piston | |
Sticky Piston | |
-Piston | |
Sticky Piston | |
-Piston | |
Sticky Piston | |
-Piston | |
Sticky Piston | |
-Piston |
See? :)
You're a bit late on this sadly as the whole crafting system is currently being reworked. I'm pretty sure these things are on the Todo list or already done.
He's posted a picture of the new crafting monitor on his twitter.
As far as the request is concerned, that's about what I meant. Hopefully that also fixes the issue.