MineColonies

MineColonies

53M Downloads

Extreme lag caused by MineColonies event callback

Paril opened this issue · 4 comments

commented

Minecolonies version

minecolonies-1.12.2-0.9.3-RELEASE-universal.jar

Expected behavior

No server-side lag, at least not this much.

Actual behaviour

Every few seconds, the game will run several seconds behind - more than 3 seconds at times.

Steps to reproduce the problem

No idea, started happening randomly in my village. Only happens at day time; during night when they are asleep, the lag is gone.

LagGoggles reports that MineColonies' event handler is huge up on the profile list (a side note, profiling tools would be super great for MineColonies).

I'm playing a fairly large modpack, but in theory all you'd need is the map. The missing blocks/items won't be a problem since Minecolonies only uses vanilla stuff.

Map backup during lag here: http://paril.ca/2018-10-01-05-09-09.zip
The village is located at x 2465 z 2450

commented

Use TickProfiler (https://minecraft.curseforge.com/projects/tickprofiler) and have it scan for entity issues with "/profile e 120". It should tell you specifically which worker in your colony is causing the problem and where they are. You can then either try firing/rehiring them, or respawn them which fixed them (at least temporarily) at least for me.

If it keeps happening then it may be a routing issue between their home and where they work which is what happened in my instance.

commented

it is this issue again: #2849 You got 2873 workorders for your mineshaft. (can be seen by opening colony1 with nbtexplorer). Using the nbtexplorer to remove them might help getting rid of the lag, though not sure if they're saved in the capabilities aswell(backup world before doing any modifications :D)

commented
commented

Use TickProfiler (https://minecraft.curseforge.com/projects/tickprofiler) and have it scan for entity issues with "/profile e 120". It should tell you specifically which worker in your colony is causing the problem and where they are. You can then either try firing/rehiring them, or respawn them which fixed them (at least temporarily) at least for me.

If it keeps happening then it may be a routing issue between their home and where they work which is what happened in my instance.

I was using LagGoggles which does profile entities as well; I don't think MineColonies does things in entity events but rather in one global event handler, since it only showed that event handler as being problematic. The Miner herself was well under a few milliseconds/nanoseconds.

it is this issue again: #2849 You got 2873 workorders for your mineshaft. (can be seen by opening colony1 with nbtexplorer). Using the nbtexplorer to remove them might help getting rid of the lag, though not sure if they're saved in the capabilities aswell

Thanks for the discovery! I'll avoid building the miner for a while.