ItemMoveListener
causing a lot of lag due to isShopBlock
creating chest snapshots
#604
Closed
4 tasks done
Labels
Milestone
What is happening?
ChestShop is using a LOT of CPU time due to the snapshots created for the
isShopBlock
checks. While ChestShop does take care to not create snapshots on theItemMoveListener
for the source/destination blocks, ChestShop still checks chests with snapshots, which causes the TPS to tank hard if you have multiple hoppers.Currently the
isShopBlock
implementation is like this...But it could be like this, considering that it seems that ChestShop doesn't need the block states to be a snapshot.
Currently as a workaround I'm using
TURN_OFF_HOPPER_PROTECTION
to true, that "fixes" the issue.What did you expect to happen?
For ChestShop to not lag xd
Plugin Version
ChestShop version 3.12.3-SNAPSHOT (build 417)
Plugin Config
Server Version
This server is running SparklyPaper version 1.20.6-DEV-ver/1.20.6@099860a (2024-06-30T03:31:05Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT)
Server Log
there isn't any errors
What other plugins are you running?
Agreements
Additional context
Yes, in reality I'm not running the latest version (it is a few builds behind), but I have checked the code and there wasn't any changes on that code path between the version I'm using and the latest version.
And yes, I'm using a Paper fork that I made, but by looking at the code I can see that the same behavior would also happen in Paper.
The text was updated successfully, but these errors were encountered: