Repository navigation
Fix chunks not appearing until the player moved & Incorrect render distance - #86
Open
NotStirred wants to merge 8 commits into
Open
NotStirred wants to merge 8 commits into
NotStirred wants to merge 8 commits into
Conversation
Previously dasm log messages were buried, this commit places them in gradle log output so they can be easily seen.
Vanilla's PlayerTicketTracker propagates levels out to ChunkMap.MAX_VIEW_DISTANCE (32) regardless of the actual view distance. In cubic worlds each step is a cube in 3D, so every player move between cubes recomputed levels for ~65^3 positions, which dominated server thread time. In cubic worlds, shrink the tracker's range in place to the maximum view distance in cubes.
setServerViewDistance passed the view distance in chunks to updatePlayerTickets, which in cubic worlds is compared against cube distances, so cubes were ticketed out to twice the intended distance (~7x as many cubes). Convert it as cc_updateChunkTracking already does.
Vanilla skips propagating to neighbors when decreasing into the last two levels, since nothing can be propagated from them. The cubic override dropped this check.
Vanilla's player ticket throttler allows 4 positions in execution at once, each freed only once that position reaches entity ticking. Cubic worlds have far more positions in view, and each cube depends on a 3D neighborhood, so 4 slots left the server and worldgen threads mostly idle. Positions are still taken nearest-first.
The worldgen executor runs one task at a time, so generating terrain inline serialized all cube generation. Like vanilla's fillFromNoise, run it on the background executor, writing to acquired sections without per-block locking. Also compute the terrain height once per column rather than once per block.
Member
Author
|
I didn't like the loading performance, unfortunately it wasn't one thing. Added a bunch of small changes to help performance, I can now fly at full spectator speed diagonally at 32 render distance and terrain is still visible in front a few chunks ahead. Any commit should be droppable if needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also in the diff is a dasm fix + a patch to add classloading (mixin/dasm) errors to the normal
./gradlew testlog output, rather than it being buried in xml reports