-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimizations for Paper (cargo network optimizations) #2106
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. PaperLib is a nice thing to add. We should be making a paper tag on the server too when this PR is merged.
src/main/java/io/github/thebusybiscuit/slimefun4/core/commands/subcommands/VersionsCommand.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/gps/ElevatorPlate.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks alright.
src/main/java/io/github/thebusybiscuit/slimefun4/api/gps/TeleportationManager.java
Outdated
Show resolved
Hide resolved
src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/gps/ElevatorPlate.java
Outdated
Show resolved
Hide resolved
Ready to be merged? @WalshyDev I tested it on Spigot and Paper again, no issues thus far. |
Description
This Pull Request introduces a bunch of optimizations for Servers using Paper.
Paper uses Asynchronous Chunk Generation/Loading which can improve performance for long-distance teleports.
BlockState Snapshots
Normally, Spigot creates a new BlockState instance as a hard copy, for InventoryHolders the Inventory is only copied softly, as a reference. Since Inventories are already Thread-safe and only the reference is passed, cargo networks have no reason to create a BlockState snapshot.
This behaviour cannot be avoided when using Spigot, with Paper it can.
So this will improve performance drastically (Sometimes up to 6 times smoother from what i tested) and optimize Cargo networks to work best when using Paper.
Changes
Checklist