High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies
Go to file
Aikar a76bc4029d
Improve Chunk Status Transition Speed
When a chunk is loaded from disk that has already been generated,
the server has to promote the chunk through the system to reach
it's current desired status level.

This results in every single status transition going from the main thread
to the world gen threads, only to discover it has no work it actually
needs to do.... and then it returns back to main.

This back and forth costs a lot of time and can really delay chunk loads
when the server is under high TPS due to their being a lot of time in
between chunk load times, as well as hogs up the chunk threads from doing
actual generation and light work.

Additionally, the whole task system uses a lot of CPU on the server threads anyways.

So by optimizing status transitions for status's that are already complete,
we can run them to the desired level while on main thread (where it has
to happen anyways) instead of ever jumping to world gen thread.

This will improve chunk loading effeciency to be reduced down to the following
scenario / path:

1) MAIN: Chunk Requested, Load Request sent to ChunkTaskManager / IO Queue
2) IO: Once position in queue comes, submit read IO data and schedule to chunk task thread
3) CHUNK: Once IO is loaded and position in queue comes, deserialize the chunk data, process conversions, submit to main queue
4) MAIN: next Chunk Task process (Mid Tick or End Of Tick), load chunk data into world (POI, main thread tasks)
5) MAIN: process status transitions all the way to LIGHT, light schedules Threaded task
6) SERVER: Light tasks register light enablement for chunk and any lighting needing to be done
7) MAIN: Task returns to main, finish processing to FULL/TICKING status

Previously would have hopped to SERVER around 12+ times there extra.
2020-05-30 01:12:18 -04:00
.github/ISSUE_TEMPLATE [CI-SKIP] Update Issue template 2018-09-26 17:22:20 -04:00
licenses [CI-SKIP] Clarify project licensing 2018-03-06 20:41:03 -05:00
Paper-MojangAPI Rename to AsyncPlayerSendSuggestionsEvent to be consistent in naming 2020-05-02 15:29:03 -04:00
removed Drop remove leaked chunk patch - causing many issues 2020-05-29 03:32:13 -04:00
scripts Preload important classes such as Logger and JLine 2020-05-24 13:19:08 -04:00
Spigot-API-Patches Preload important classes such as Logger and JLine 2020-05-24 13:19:08 -04:00
Spigot-Server-Patches Improve Chunk Status Transition Speed 2020-05-30 01:12:18 -04:00
work Updated Upstream (Bukkit/CraftBukkit) (Fixes #3443) 2020-05-28 12:22:50 +01:00
.editorconfig [CI-SKIP] add .editorconfig for base code style settings 2018-08-07 01:14:22 -04:00
.gitignore Fix ./paper edit continue for Windows 2020-05-19 23:14:34 -04:00
.gitmodules Cleanup and restructure the project 2016-04-01 23:15:41 -05:00
.travis.yml [CI-SKIP] Have travis ensure openjdk11 builds run 2018-10-24 16:26:47 -04:00
CONTRIBUTING.md Fix path in CONTRIBUTING.md (#3406) 2020-05-19 23:08:37 -04:00
LICENSE.md Add API MinecraftServer#isStopping (#3129) 2020-04-11 01:51:35 -04:00
paper Optimize sending packets to nearby locations (sounds/effects) 2020-05-23 17:17:14 -04:00
pom.xml Implement Brigadier Mojang API 2020-04-27 01:42:12 -04:00
README.md [CI-SKIP] Update build badge in README to use proper job 2020-02-08 17:58:39 -06:00

Paper Build Status

High performance Spigot fork that aims to fix gameplay and mechanics inconsistencies.

Support and Project Discussion:

How To (Server Admins)

Paperclip is a jar file that you can download and run just like a normal jar file.

Download Paper from our downloads page.

Run the Paperclip jar directly from your server. Just like old times

How To (Plugin Developers)

  • See our API patches here
  • See upcoming, pending, and recently added API here
  • Paper API javadocs here: papermc.io/javadocs
  • Maven Repo (for paper-api):
<repository>
    <id>papermc</id>
    <url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
  • Artifact Information:
<dependency>
    <groupId>com.destroystokyo.paper</groupId>
    <artifactId>paper-api</artifactId>
    <version>1.15.2-R0.1-SNAPSHOT</version>
    <scope>provided</scope>
 </dependency>

How To (Compiling Jar From Source)

To compile Paper, you need JDK 8, maven, and an internet connection.

Clone this repo, run ./paper jar from bash, get files.

How To (Pull Request)

See Contributing

Special Thanks To:

YourKit-Logo

YourKit, makers of the outstanding java profiler, support open source projects of all kinds with their full featured Java and .NET application profilers. We thank them for granting Paper an OSS license so that we can make our software the best it can be.