Generate valid machine input lists on game load rather than on tile instantiation
Sir-Will opened this issue ยท 10 comments
RecipeHelper.validFluids
is a slow method but is only called when the tile entity is first created and never again - are you sure this is actually causing a performance hit?
Is 3% really a lot though? It's a big method because it has to set up the filters on the machine's tanks by going through all the recipes. It's only ran a single time though, so I can't see how that would cause any performance hits other than on world load. I guess a I could set up a set of static filters to speed it up a little more.
I think so, but since you did bring it up, I think I could improve the performance a bit by doing one big set of recipe checks on game load instead of when each of the TEs load :)
If it's all the same that would be great, I thought it would be different depending on the settings of the tile.
Each machine of the same type will share the same list of valid fluids, so once the list is generated for each machine type on load no more would have to be generated.