SuperMartijn642 / Tesseract

9 stars 9 forks source link

[Bug] Bad performance at mekanism & tesseract #53

Closed bigenergy closed 1 year ago

bigenergy commented 1 year ago

Version Info

Description of the Bug Bad performance, low tps

Steps to Reproduce Connect multiple Tesseracts to the Mekanism Transmitter Networks

Screenshots image

https://spark.lucko.me/taVI6E5Vgd

https://github.com/SuperMartijn642/Tesseract/blob/1.18/src/main/java/com/supermartijn642/tesseract/capabilities/CombinedItemHandler.java#L165 As far as I understand, with each transfer of objects, the tesseract checks all channels. Maybe cache this?

SuperMartijn642 commented 1 year ago

The CombinedItemHandler#isValid method only checks inventories around tesseracts on the channel it is for, not all channels. There is no way to cache #isValid as the underlying inventories may change their number of slots and what they return for IItemHandler#isItemValid at any time.

bigenergy commented 1 year ago

The CombinedItemHandler#isValid method only checks inventories around tesseracts on the channel it is for, not all channels. There is no way to cache #isValid as the underlying inventories may change their number of slots and what they return for IItemHandler#isItemValid at any time.

What about world caching? It almost never changes, although it consumes about 5%

https://github.com/SuperMartijn642/Tesseract/blob/1.18/src/main/java/com/supermartijn642/tesseract/manager/TesseractReference.java#L52

glenn2223 commented 1 year ago

Just a quick - me too 😜


Was having issues in ATM8, whereby minecolonists were lagging/jarring about the place and jetpack flight caused "moved too quick" issues (as the server couldn't keep up). Disconnected the universal cable from the tesseract (as below) and all sorted

image

Spark logs (for ref): https://spark.lucko.me/lZap8RpBrj (Whilst connected) https://spark.lucko.me/oBJLXOpONH (disconnected toward the end) https://spark.lucko.me/7ZRNfYsqKD (not connected for a bit)

jpeaglesandkatz commented 1 year ago

Just a quick - me too 😜

Was having issues in ATM8, whereby minecolonists were lagging/jarring about the place and jetpack flight caused "moved too quick" issues (as the server couldn't keep up). Disconnected the universal cable from the tesseract (as below) and all sorted

image

Spark logs (for ref): https://spark.lucko.me/lZap8RpBrj (Whilst connected) https://spark.lucko.me/oBJLXOpONH (disconnected toward the end) https://spark.lucko.me/7ZRNfYsqKD (not connected for a bit)

Just a note.. On my local server I get the moved too quick message sometimes too.. I doubt it has anything to do with tesseracts since I don't use them.. neither do I use mining colonies on ATM8 and I don't use the jetpack anymore but the meka suit. And tbh.. Mekanism is dorky and buggy as it can be with unexplained weird behaviour all the time....

SuperMartijn642 commented 1 year ago

I have made some significant performance improvements now in Tesseract version 1.0.30. Thank you for reporting the issue and the excellent report 🙂