Hexerei

Hexerei

16M Downloads

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

jinkhya opened this issue ยท 4 comments

commented

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.

commented

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:

  • create an empty world
  • move away from spawn (as its force loaded) tested it with +1000 blocks to be sure
  • place any hexerei-chest or hexerei-double-chest
  • check Mean Tick Time
  • move away from area where the chest was placed
  • check Mean Tick Time
  • move back to area with the chest
  • check Mean Tick Time

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

commented

checked using JoeFoxe/Hexerei-1.19@1d89da9

  • issue reproducible
  • related to sync method in ModChestBlockEntity calling level.getChunkAt(worldPosition)
    need to make some debugging to get more info
commented

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

  • not caring about any side effects I commented out the override of the onChunkUnloaded and the issue is not reproducible anymore (as i am not sure if the override was intended I dont like to call it a fix)
commented

Can be closed:
Fixed with JoeFoxe/Hexerei-1.19@a4f5540

latest test done with hexerei-0.3.0