JoeFoxe / Hexerei-1.18

21 stars 12 forks source link

[1.19] Heavy lag caused by "net.joefoxe.hexerei.tileentity.ModChestBlockEntity.onChunkUnloaded" #69

Open jinkhya opened 1 year ago

jinkhya commented 1 year ago

Hello there's something going on with the method from title as you can see in the spark report below : https://spark.lucko.me/JCZYgVZseM

Modpack : TKL The wild adventure Hexerei : 0.2.5 forge : .47

Thanks in advance.

UdoMorgenstern commented 1 year ago

can confirm this issue, quite severe https://spark.lucko.me/R4j0CUuXYm

would take a look myself and help out but the source code on git seems to be outdated

Edit: added test steps - checked in flat world with mob spawn rule set to false

steps to reproduce:

Outcome: Mean Tick Time raises from ~6 to around ~50 when server tried to unload chunk goes back to when teleporting back to chunk

image image

UdoMorgenstern commented 1 year ago

checked using https://github.com/JoeFoxe/Hexerei-1.19/commit/1d89da92a90891368eef600c7900835b8202134e

UdoMorgenstern commented 1 year ago

comparing the usage of the sync methods from other blocks, these are only called in the setChanged() methods but in the ModChestBlockEntity the onChunkUnloaded function is calling it as well

UdoMorgenstern commented 1 year ago

Can be closed: Fixed with https://github.com/JoeFoxe/Hexerei-1.19/commit/a4f55404560febdcf207baf07c4b0dfe76c16e56

latest test done with hexerei-0.3.0