The Twilight Forest

The Twilight Forest

143M Downloads

Performance issue in TFTeleporter#placeInExistingPortal

ImMorpheus opened this issue ยท 1 comments

commented

Forge version: 14.23.5.2838
Twilight Forest version: 1.12.2-3.8.689
Link to crash log: none

this.world.getChunkProvider().queueUnload(chunk);

This is queuing for unload the same chunk over and over. (not sure about the logic in the first part of the for loop, but this looks like an issue).
There is not check to know if

Chunk chunk = this.world.getChunk(chunkPos.x, chunkPos.z);
returned a previous handled chunk.

This was found thanks to SpongePowered/SpongeForge#2862
(the method was queuing for unload the spawn chunk over and over which was triggering a config save).

commented

looks like that snippet of code is no longer used in modern versions (its commented out) so I assume this is no longer an issue