[Bug]: Lag from saving TieredBeehives
Darkere opened this issue · 4 comments
Bug Description
Saving apiaries takes a long time if there are a lot of combs inside.
On this line numberOfCombs()
seems to copy the list of all combs every iteration.
Spark report that shows the issue in practice:
https://spark.lucko.me/gSGXLzjdGS
Screenshot in case the report expires:
How to Reproduce?
No response
Expected Behavior
No response
Version
github latest
Mod Loader Version
any
Logs or additional context
No response
Acknowledgement
- I agree that I read the terms at the top of the page.
Thank you for the report! I’ll take a look at it as soon as I am able to. A bit busy this week as I just brought my baby home from the hospital on Sunday.
We can probs replace our current honeycomb storage system with a itemstackhandler, would also probs fix this issue and allow for less redundant code as we are essentially just making our own itemstack handler but using a queue system.
I mean yes that will help, but for a quick fix just putting numberOfCombs() into a variable will already reduce the impact significantly. Evaluating that every iteration is just completely pointless.