Towdium / JustEnoughCalculation

A simple minecraft mod help you calculate the cost for recipes
Other
53 stars 38 forks source link

Performance issues when there is many ingredients for a recipe #99

Open CleanCutBloons opened 2 years ago

CleanCutBloons commented 2 years ago

I tried to break down the Vending Upgrade in Omnifactory, just to see what is required. But once the number of ingredients is greater than a hundred or slow, the calculator would be very slow. It would take around 5 seconds to load or close, or to import any new recipes. However, if I switched to a new recipe, the issues were gone. Gameplay was not otherwise affected.

Towdium commented 2 years ago

Yes, the lag is caused by calculation of the selected item. Once you change the item, the lag is gone. I know the performance problem for a long time, and it's caused by a very high time complexity of CostList merging. I have searched for some algorithms for a descent improvement, but have no time for it. It's always the top priority on my long term todo list.