Pixelmon Mod - Bug tracker

[5.0.4] Extreme tick lag when within a drained Ocean/Deep Ocean. fix completed

Ticket description:
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 ... 606a3ff9e1

The 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.mca
www.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.png
5. //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)

Comments

#16308 Posted by XpanD » 18 May 2017 18:44

Just had a friend (server co-owner) try this locally too. It did not work initially, but after standing still at the center of the regions I provided and using /butcher, this happened:

https://timings.aikar.co/?id=404d2d1543 ... 675c453ae9

spongeforge-1.10.2-2281-5.2.0-BETA-2341 && forge-1.10.2-12.18.3.2297-universal

#16309 Posted by Xenoyia » 18 May 2017 19:54

I put the offending regions back on our server and replaced the gravel in the drained area with grass/dirt. This stopped all the lag and trainers began spawning again.

The problem is definitely linked to NPC trainers not being able to spawn on gravel.

#16311 Posted by XpanD » 19 May 2017 05:56

Post-grassing timings report on main server:
https://timings.aikar.co/?id=a399a4281e ... f2f4c69911

I'm a happy camper. Hope this is easy to track down and fix.

#19655 Posted by LordSamosa » 11 May 2020 11:32

This ticket is expired. If you believe this is still an issue, please make a new ticket.

Ticket details

  • Ticket ID: 12107
  • Project: Pixelmon Mod
  • Status: Fix completed
  • Component: Spawning
  • Project version: 5.x.x
  • Priority: Normal
  • Severity: Normal
  • Forge/Sponge: Forge 12.18.3.2281, Forge 12.18.3.2297, SpongeForge 1.10.2-2281-5.2.0-BETA-2341, SpongeForge 1.10.2-2281-5.2.0-BETA-2282, SpongeForge 1.10.2-2281-5.2.0-BETA-2274
  • What else would be useful to know?: Java 8, Pixelmon 5.0.4, WorldEdit (forge-mc1.11.6.1.6-dist), PixelExtras 2.2.5 and 2.2.6 (skinny test server to rule things out)
  • Assigned to: (unassigned)
  • Reported by: XpanD (Send PM)
  • Reporter's tickets: (List all tickets)
  • Reported on: 18 May 2017 18:14
  • Ticket last visited by: LordSamosa on 11 May 2020 11:31
JOIN THE TEAM