One of our players was working on a big build in a Deep Ocean biome, with occasional bits of Ocean. They made an enormous square wall, and we then drained out the water inside. Soon after, things got really REALLY laggy. Nucleus said our ticks per second were at 8 or 9 (20 normally), and /sponge timings report reported... well, see below:
https://timings.aikar.co/?id=c2043cd582 ... 606a3ff9e1The above isn't an isolated thing, either -- it happened any time somebody would teleport into or fly over this build. After a lot of messing around and a bit of great advice from the Server Owner's Discord, I moved the world over to a lean local server to see if I could figure anything out with WarmRoast. Doing that, I found out what seemed to be causing the issues, and also found a way to work around it. Relevant files and a how-to follow.
Needed files:
www.expand.rs/r.6.-5.mcawww.expand.rs/r.6.-6.mca(or just drain an ocean using WorldEdit, and then try this there)
1. Dump files in a random test world's "region" folder.
2. Start test server. Get WorldEdit up and running, makes things a lot easier. Add debugging/performance-checking thing of choice.
3. /minecraft:teleport YOURNAME 3406 55 -2495
4. Check performance, do debug-y stuff. Even flying around on Pokémon should be awful. You should see something like this (WarmRoast):
----
http://www.expand.rs/tree1.png5. //replacenear 100 gravel grass
6. Wait for this to complete. Might take a bit.
7. Check performance, do more debug-y stuff. Lag should be gone!
8. To go back to the laggy state, //replacenear 100 grass gravel. After that, /butcher -f 100 to clear out the NPCs that spawned on grass.
9. Rinse and repeat!
Important: If there's any place near you where trainers can spawn (dirt, sand, etc.) it seems to perform fine. Replace with gravel, butcher and retry -- that should make it kick in.
Trainers seem to spawn fine when the floor is grass, but nothing is spawning when it's gravel. Is the lag caused by it constantly trying to spawn trainers and failing? Hope this helps find this issue, and keep up the good work!
(and if you need any more info, just let me know -- test setup is saved and ready to go)