Botania

Botania

133M Downloads

Crafty Crate should cache recipes

Vosty opened this issue ยท 0 comments

commented

Version Information

Forge version: 36.0.43
Botania version: 1.16.4-411

Further Information

spark analysis
While doing a CPU analysis on my server I noticed that the crafty crate uses quite a bit of CPU (the percentages in the image are the amount of CPU usage per tick) when doing its recipe lookups. In heavily modded minecraft this is a liability, as recipe lookups can become quite intensive.
In the vast majority of set-ups the crafty crate only makes one item recipe over and over, and even in the most advanced set-ups it has generally has an upper limit to how many recipes it makes. I suggest that it cache the recipes to save valuable CPU time.

What I expected to happen:
The crafty crate would cache recipes it has seen before.

What happened instead:
The crafty crate looks up the recipe every single time.