/tc reload world causes lots of lag
ChrisLane opened this issue ยท 10 comments
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
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.
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.
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.
I'd say it takes a bit longer, there's definitely something wrong going on here though.
Is the server busy doing other things while reloading, or are you the only one online?