Skip to content

Performance patches prerequisite#2802

Merged
zachbr merged 4 commits into
PaperMC:masterfrom
Spottedleaf:performance-patches
Jan 28, 2020
Merged

Performance patches prerequisite#2802
zachbr merged 4 commits into
PaperMC:masterfrom
Spottedleaf:performance-patches

Conversation

@Spottedleaf
Copy link
Copy Markdown
Member

@Spottedleaf Spottedleaf commented Dec 28, 2019

Original patches:
https://github.com/Spottedleaf/Concrete/blob/bleeding/patches/server/0004-Util-patch.patch
https://github.com/Spottedleaf/Concrete/blob/bleeding/patches/server/0022-Improve-autosave-performance.patch
https://github.com/Spottedleaf/Concrete/blob/bleeding/patches/server/0023-Avoid-immediately-autosaving-newly-generated-loaded-.patch

See patch notes for details
The patches aren't always 1:1 ports, they may have been changed to improve behavior or performance in some areas

They've all been dumped in this PR since they tend to have dependencies on each other (most notably the mc-util patch)

@electronicboy
Copy link
Copy Markdown
Member

pre-looking at the patches comment: gfdi leaf

@Spottedleaf Spottedleaf changed the title Performance patches Performance patches #1 Dec 28, 2019
@Spottedleaf Spottedleaf marked this pull request as ready for review December 28, 2019 17:35
@Spottedleaf
Copy link
Copy Markdown
Member Author

now it's just the patches that cause big diffs

@AJMFactsheets
Copy link
Copy Markdown
Contributor

I built this branch for local testing and the only problem I found is that when a player dies, there is a high chance they will get stuck in a limbo mode where chunks won't load, entities jitter, and they player can't move.

@Spottedleaf
Copy link
Copy Markdown
Member Author

can't produce locally, paste output of /version

@HexedHero
Copy link
Copy Markdown
Contributor

#LeafForProjectDev

@electronicboy
Copy link
Copy Markdown
Member

mostly looks like your server is overworked from mob spawning/player movement

@Spottedleaf
Copy link
Copy Markdown
Member Author

yeah I don't see much of a difference between the two, and without a testing environment I can't do anything about it

@AJMFactsheets
Copy link
Copy Markdown
Contributor

Output of /version: This server is running Paper version git-Paper-"59df758f" (MC: 1.15.1) (Implementing API version 1.15.1-R0.1-SNAPSHOT)

After further testing, I have found that the death bug only happens after a player has slept in a bed.

@Spottedleaf
Copy link
Copy Markdown
Member Author

unable to produce after sleeping in a bed

@AJMFactsheets
Copy link
Copy Markdown
Contributor

I built a new jar based off of the new commit and the death glitch still persists. I realized beds have nothing to do with the glitch, but it has something to do with spawn chunks.

Start a new world with default settings, and /kill yourself at the world spawn. Upon respawning, you should be unable to move, unless you relog or teleport far away.

The glitch reminds me of MC-138539
I also tested with 1.15.1 Paper-31 and didn't have any problems.

@Spottedleaf
Copy link
Copy Markdown
Member Author

Yeah I see what's going on here now - a typo. The reason it only happens at spawn is because once chunks get loaded they are sent to the player - at spawn they only load once.

Fixed in latest commit.

Thanks for your patience and detailed report.

Copy link
Copy Markdown
Member

@electronicboy electronicboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Spottedleaf/Concrete:patches/server/0004-Util-patch.patch@bleeding

  • Spottedleaf/Concrete:patches/server/0022-Improve-autosave-performance.patch@bleeding

  • Spottedleaf/Concrete:patches/server/0023-Avoid-immediately-autosaving-newly-generated-loaded-.patch@bleeding

  • Spottedleaf/Concrete:patches/server/0013-Per-player-view-distance-implementation.patch@bleeding

  • Spottedleaf/Concrete:patches/server/0015-Optimize-isOutsideRange-to-use-a-square-radius-check.patch@bleeding

  • Spigot-Server-Patches/0420-Optimise-getChunkAt-calls-for-loaded-chunks.patch

@zachbr zachbr self-requested a review January 10, 2020 03:27
@Spottedleaf Spottedleaf changed the title Performance patches #1 Performance patches prerequisite Jan 10, 2020
Comment thread scripts/importmcdev.sh
Prereq changes for the coming storm of performance patches.
Includes optimising incremental saving
@Spottedleaf
Copy link
Copy Markdown
Member Author

updated to 1.15.2, fixed build

Copy link
Copy Markdown
Member

@electronicboy electronicboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zachbr zachbr merged commit d16a5d8 into PaperMC:master Jan 28, 2020
@Misio12320
Copy link
Copy Markdown

How much % the game has been upgraded with performance and when release of view distance for 1.15.2?

@perseus5
Copy link
Copy Markdown
Contributor

How much % the game has been upgraded with performance and when release of view distance for 1.15.2?

yes

@Spottedleaf
Copy link
Copy Markdown
Member Author

it's a prereq patch so like maybe 2% at most

@jonttm
Copy link
Copy Markdown

jonttm commented Jan 28, 2020

Are you going to bring the per-player view distance patch back in the future?

@Spottedleaf
Copy link
Copy Markdown
Member Author

yes, some other stuff needs to go in first though

@NicoNekoDev
Copy link
Copy Markdown

NicoNekoDev commented Jan 28, 2020

it's a prereq patch so like maybe 2% at most

that's a lot :O gonna test it now on my 20gb server, i'll report back the performance.
Edit: here's is the performance report: https://timings.aikar.co/?id=8fe23d8d5ecf4518a4c5d132e73e213a (i've maxed to 32 gb)
The only thing I've noticed was the chunks loading in a V form when I travel fast.
My only problem is the new chunks beeing generated very slow, also it looks like I do have somewhere a memory leak, as the server ram start to increase over time.

MiniDigger pushed a commit to MiniDigger/Paper that referenced this pull request Feb 3, 2020
Prereq changes for the coming storm of performance patches.
Includes optimising incremental saving
LeonTG pushed a commit to LeonTG/Paper that referenced this pull request May 17, 2026
Prereq changes for the coming storm of performance patches.
Includes optimising incremental saving
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants