Terrain Control

Terrain Control

235k Downloads

/tc reload world causes lots of lag

ChrisLane opened this issue ยท 10 comments

commented

After running the /tc reload command on a world the server will lag quite a lot even completing the reload action.

Terrain Control v2.4.14
Spigot build 1080

commented

^ Please provide that information.

commented

http://pastebin.com/zjbzjNzj

Nothing special in the log that I can see. No lag before /tc reload command at line 265.
Started testing lag by typing in chat just before line 270 and then tried commands. At first there wasn't much lag and then it increased. The commands and the chat afterwards were very laggy.

It might be worth running a server through a java profiler.

commented

A Java profiler would help a lot. I would expect that 600 config files would take a while to load, but after that the lag should be gone. I honestly have no idea why the lag continues. Even if there is a memory leak and the old config stay in memory, that shouldn't cause so much lag.

commented

Does reloading take as long as the nomal loading of the config files at startup, or is it (much) longer?

One trick would be to set SettingsMode to WriteDisable, so that TC doesn't try to write to all the config files.

commented

I'd say it takes a bit longer, there's definitely something wrong going on here though.

commented

Is the server busy doing other things while reloading, or are you the only one online?

commented

It happens even with only me on too.

commented

Strange, as the reloading code is exactly the same as the loading code.

commented

May you show your console log ?
And point to last line before lag ..

commented

For 2.6.0, /tc reload was rewritten, so I hope it fixed the lag.