3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Commit graph

4 Commits

Autor SHA1 Nachricht Datum
Aikar
146b99080c
Improve ChunkMapDistance.b crash fix to clean up properly
There is some vanilla level bug where this tracking state appears
to get messed up and player doesn't exists in chunk its trying to untrack.

We returned early to prevent crashing, but I suspect if there was a level being
tracked for the chunk, it got leaked due to the early return.

So going to ensure we clean up the level tracker when this state occurs.

This may help with any leaked chunk issues.
2020-06-09 23:05:43 -04:00
stonar96
de6dfedfef
Make Anti-Xray multithreaded (#3520)
Obfuscate multiple chunks at a time over the server thread pool.

Will speed up chunk processing when anti xray is enabled.

Co-authored-by: Aikar <aikar@aikar.co>
2020-06-09 04:12:20 -04:00
Aikar
b2d81e21c5
Improve Chunk Prioritization and Internal Scheduler
In previous MC versions, we had a rather simple internal scheduler
for delayed tasks that would just keep pushing task back until desired
tick was reached.

The method it called to schedule the task changed behavior in 1.14, and now
this scheduler is not working nowhere near what it was supposed to be doing.

This was causing long delayed task to eat up CPU (In Oversleep for example)

Rewrite this to just use the CraftScheduler for scheduling delayed tasks.

Once this was fixed, it became quite clear the code that delayed ticket
additions for chunks based on distance was clearly not right, as it was
tested on the previous broken logic.

So the ticket delay process has been vastly revamped to be even smarter.
Chunks behind the player can load slower than the chunks in front of the player.
We also can delay ticket adding until one of its neighbors has loaded, as
this lets us get a smoother spiral out for the chunks (minus frustum intent).

Additionally on frustum previous commit inadvertently broke frustum trying to
fix an issue when the real fix lied elsewhere, so restore chunk priority so
it works again.
2020-06-09 03:17:25 -04:00
Aikar
f0409edcd7
Drop Close region files patch, doesn't add any value.
Upon further knowledge of the system, it is known that region files
are closing properly, as well as this didn't help native memory use anyways.

This patch also caused issues compiling on a newer JDK being able to
release the jar to java 8 users.
2020-06-08 17:07:23 -04:00