Improve recipe lookup performance with Auto-Crafting Table and Iron Furnace
Technici4n opened this issue ยท 1 comments
We are having a performance problem with TR on AOF. See https://spark.lucko.me/#9WWTbPbHAP and in particular the following picture:
It seems the furnace and the crafting table iterate through all recipes. I would suggest building a cache, like I suggested in #2242.
This is quite straightforward, as shown by MI: https://github.com/AztechMC/Modern-Industrialization/blob/2a23bba4c51c4463f38da0a597e2b1dc65298a58/src/main/java/aztech/modern_industrialization/machines/recipe/MachineRecipeType.java#L78.
Modmuss also suggested caching the last recipe, I guess both optimizations would help a ton!