Tech Reborn

Tech Reborn

30M Downloads

Improve recipe lookup performance with Auto-Crafting Table and Iron Furnace

Technici4n opened this issue ยท 1 comments

commented

We are having a performance problem with TR on AOF. See https://spark.lucko.me/#9WWTbPbHAP and in particular the following picture:
image

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!

commented

The iron furnace should be better, im still not sold on the idea of a cache like you have suggested. Will need to look into this some more.