diff --git a/Spigot-Server-Patches/0054-Don-t-sleep-between-chunk-saves.patch b/Spigot-Server-Patches/0054-Don-t-sleep-between-chunk-saves.patch deleted file mode 100644 index 03d39edfc1..0000000000 --- a/Spigot-Server-Patches/0054-Don-t-sleep-between-chunk-saves.patch +++ /dev/null @@ -1,41 +0,0 @@ -From fb3e3db9d19ad2ba0f09063e00af66182e2b7134 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Wed, 2 Mar 2016 23:58:29 -0600 -Subject: [PATCH] Don't sleep between chunk saves - -For some unknown reason, Minecraft is sleeping 10ms between every single chunk being saved to disk. -Under high chunk load/unload activity (lots of movement / teleporting), this causes the chunk unload queue -to build up in size. - -This has multiple impacts: -1) Performance of the unload queue itself - The save thread is pretty ineffecient for how it accesses it - By letting the queue get larger, checking and popping work off the queue can get less performant. -2) Performance of chunk loading - As with #1, chunk loads also have to check this queue when loading - chunk data so that it doesn't load stale data if new data is pending write to disk. -3) Memory Usage - The entire chunk has been serialized to NBT, and now sits in this queue. This leads to - elevated memory usage, and then the objects used in the serialization sit around longer than needed, - resulting in promotion to Old Generation instead of dying young. - -If there is work to do, then the thread should be doing its work, and only sleep when it is done. - -diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java -index 198b00f..07072ba 100644 ---- a/src/main/java/net/minecraft/server/FileIOThread.java -+++ b/src/main/java/net/minecraft/server/FileIOThread.java -@@ -39,11 +39,12 @@ public class FileIOThread implements Runnable { - ++this.d; - } - -+ /* // Paper start - don't sleep in between chunks so we unload faster. - try { - Thread.sleep(this.e ? 0L : 10L); - } catch (InterruptedException interruptedexception) { - interruptedexception.printStackTrace(); -- } -+ } */ // Paper end - } - - if (this.b.isEmpty()) { --- -2.7.2 - diff --git a/Spigot-Server-Patches/0055-EAR-Fix-bug-with-teleporting-entities.patch b/Spigot-Server-Patches/0054-EAR-Fix-bug-with-teleporting-entities.patch similarity index 94% rename from Spigot-Server-Patches/0055-EAR-Fix-bug-with-teleporting-entities.patch rename to Spigot-Server-Patches/0054-EAR-Fix-bug-with-teleporting-entities.patch index 48c8b33fff..e93d5ea867 100644 --- a/Spigot-Server-Patches/0055-EAR-Fix-bug-with-teleporting-entities.patch +++ b/Spigot-Server-Patches/0054-EAR-Fix-bug-with-teleporting-entities.patch @@ -1,4 +1,4 @@ -From a45c3b27afcf811da685d0fc12d9f1f9fc337b1f Mon Sep 17 00:00:00 2001 +From a7b8c6d02ae86f3bb6b1efae9c6527e21baf6921 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 00:07:23 -0600 Subject: [PATCH] EAR: Fix bug with teleporting entities @@ -7,7 +7,7 @@ Subject: [PATCH] EAR: Fix bug with teleporting entities https://hub.spigotmc.org/stash/projects/SPIGOT/repos/spigot/pull-requests/52/overview diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index b0834dc..7fa5440 100644 +index 3af445b..429749a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -118,9 +118,17 @@ public abstract class Entity implements ICommandListener { @@ -32,7 +32,7 @@ index b0834dc..7fa5440 100644 public boolean impulse; public int portalCooldown; diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index 97fbd95..df2fce7 100644 +index 731efb8..75941ec 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -224,7 +224,7 @@ public class ActivationRange diff --git a/Spigot-Server-Patches/0056-Add-PlayerInitialSpawnEvent.patch b/Spigot-Server-Patches/0055-Add-PlayerInitialSpawnEvent.patch similarity index 96% rename from Spigot-Server-Patches/0056-Add-PlayerInitialSpawnEvent.patch rename to Spigot-Server-Patches/0055-Add-PlayerInitialSpawnEvent.patch index 918872d0c2..466d218133 100644 --- a/Spigot-Server-Patches/0056-Add-PlayerInitialSpawnEvent.patch +++ b/Spigot-Server-Patches/0055-Add-PlayerInitialSpawnEvent.patch @@ -1,4 +1,4 @@ -From 07d4710b337e7a009b56999284d222c70132389f Mon Sep 17 00:00:00 2001 +From 631ba7666d943d5531c62edc2d50cffb9d2da96b Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Thu, 3 Mar 2016 00:09:38 -0600 Subject: [PATCH] Add PlayerInitialSpawnEvent diff --git a/Spigot-Server-Patches/0057-Process-Entity-Chunk-Registration-on-Teleport.patch b/Spigot-Server-Patches/0056-Process-Entity-Chunk-Registration-on-Teleport.patch similarity index 94% rename from Spigot-Server-Patches/0057-Process-Entity-Chunk-Registration-on-Teleport.patch rename to Spigot-Server-Patches/0056-Process-Entity-Chunk-Registration-on-Teleport.patch index 62d9aa1cd0..44aad79e41 100644 --- a/Spigot-Server-Patches/0057-Process-Entity-Chunk-Registration-on-Teleport.patch +++ b/Spigot-Server-Patches/0056-Process-Entity-Chunk-Registration-on-Teleport.patch @@ -1,4 +1,4 @@ -From 28b2d3c901c653dc89f87fc1d1c70547a9ba3bd4 Mon Sep 17 00:00:00 2001 +From 84a31df3c679fddff1bacbb673751e2516e2ad23 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 00:12:23 -0600 Subject: [PATCH] Process Entity Chunk Registration on Teleport diff --git a/Spigot-Server-Patches/0058-Timings-v2.patch b/Spigot-Server-Patches/0057-Timings-v2.patch similarity index 99% rename from Spigot-Server-Patches/0058-Timings-v2.patch rename to Spigot-Server-Patches/0057-Timings-v2.patch index c973ef121e..e7116a52b9 100644 --- a/Spigot-Server-Patches/0058-Timings-v2.patch +++ b/Spigot-Server-Patches/0057-Timings-v2.patch @@ -1,4 +1,4 @@ -From e24dd23649a658b70444d9a084da60a508c86cf7 Mon Sep 17 00:00:00 2001 +From c12406ab06ef6c05d00b19c2111ac95171712e1d Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 diff --git a/Spigot-Server-Patches/0059-Disable-chest-cat-detection.patch b/Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch similarity index 96% rename from Spigot-Server-Patches/0059-Disable-chest-cat-detection.patch rename to Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch index 2c4463afd1..1c0432a65d 100644 --- a/Spigot-Server-Patches/0059-Disable-chest-cat-detection.patch +++ b/Spigot-Server-Patches/0058-Disable-chest-cat-detection.patch @@ -1,4 +1,4 @@ -From 85d076e03a5d9c6f725fed6d4e519d826bc953cd Mon Sep 17 00:00:00 2001 +From 42fb1b90f32ba15b2bc613d2002b3213de084d83 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:13:45 -0600 Subject: [PATCH] Disable chest cat detection diff --git a/Spigot-Server-Patches/0060-Ensure-commands-are-not-ran-async.patch b/Spigot-Server-Patches/0059-Ensure-commands-are-not-ran-async.patch similarity index 98% rename from Spigot-Server-Patches/0060-Ensure-commands-are-not-ran-async.patch rename to Spigot-Server-Patches/0059-Ensure-commands-are-not-ran-async.patch index 93a2b8bd34..9078d60bf1 100644 --- a/Spigot-Server-Patches/0060-Ensure-commands-are-not-ran-async.patch +++ b/Spigot-Server-Patches/0059-Ensure-commands-are-not-ran-async.patch @@ -1,4 +1,4 @@ -From 116d2d92f3664866cc5828523fd616bff930fc2e Mon Sep 17 00:00:00 2001 +From adf94fa7dc3aeb23f2088f168332acbbe9474ba5 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 01:17:12 -0600 Subject: [PATCH] Ensure commands are not ran async diff --git a/Spigot-Server-Patches/0061-All-chunks-are-slime-spawn-chunks-toggle.patch b/Spigot-Server-Patches/0060-All-chunks-are-slime-spawn-chunks-toggle.patch similarity index 96% rename from Spigot-Server-Patches/0061-All-chunks-are-slime-spawn-chunks-toggle.patch rename to Spigot-Server-Patches/0060-All-chunks-are-slime-spawn-chunks-toggle.patch index bf03464023..41ed062e0a 100644 --- a/Spigot-Server-Patches/0061-All-chunks-are-slime-spawn-chunks-toggle.patch +++ b/Spigot-Server-Patches/0060-All-chunks-are-slime-spawn-chunks-toggle.patch @@ -1,4 +1,4 @@ -From b2383cbb3d8efca11ce977cc2d13cb8826279af1 Mon Sep 17 00:00:00 2001 +From 2ccb13cae084aa30611c5c7a0398e4144217e129 Mon Sep 17 00:00:00 2001 From: vemacs Date: Thu, 3 Mar 2016 01:19:22 -0600 Subject: [PATCH] All chunks are slime spawn chunks toggle diff --git a/Spigot-Server-Patches/0062-Add-Location-support-to-tab-completers-vanilla-featu.patch b/Spigot-Server-Patches/0061-Add-Location-support-to-tab-completers-vanilla-featu.patch similarity index 99% rename from Spigot-Server-Patches/0062-Add-Location-support-to-tab-completers-vanilla-featu.patch rename to Spigot-Server-Patches/0061-Add-Location-support-to-tab-completers-vanilla-featu.patch index 372066e6d3..a759d23239 100644 --- a/Spigot-Server-Patches/0062-Add-Location-support-to-tab-completers-vanilla-featu.patch +++ b/Spigot-Server-Patches/0061-Add-Location-support-to-tab-completers-vanilla-featu.patch @@ -1,4 +1,4 @@ -From 4832c2374cfe6206c3684452864bb671a88d613e Mon Sep 17 00:00:00 2001 +From 734508339ddb667db95298af5ae378926b99e2bc Mon Sep 17 00:00:00 2001 From: DemonWav Date: Thu, 3 Mar 2016 01:44:39 -0600 Subject: [PATCH] Add Location support to tab completers (vanilla feature diff --git a/Spigot-Server-Patches/0063-Made-EntityDismountEvent-Cancellable.patch b/Spigot-Server-Patches/0062-Made-EntityDismountEvent-Cancellable.patch similarity index 95% rename from Spigot-Server-Patches/0063-Made-EntityDismountEvent-Cancellable.patch rename to Spigot-Server-Patches/0062-Made-EntityDismountEvent-Cancellable.patch index cc3bda0664..1d72d60aaf 100644 --- a/Spigot-Server-Patches/0063-Made-EntityDismountEvent-Cancellable.patch +++ b/Spigot-Server-Patches/0062-Made-EntityDismountEvent-Cancellable.patch @@ -1,4 +1,4 @@ -From 1bed4e4301f897bbbfe538ff9fe93aa1d183c175 Mon Sep 17 00:00:00 2001 +From f86324be40eceb5194c1f58fafd0219fb538c8da Mon Sep 17 00:00:00 2001 From: Nik Gil Date: Thu, 3 Mar 2016 04:04:19 -0600 Subject: [PATCH] Made EntityDismountEvent Cancellable diff --git a/Spigot-Server-Patches/0064-Optimize-Pathfinding.patch b/Spigot-Server-Patches/0063-Optimize-Pathfinding.patch similarity index 96% rename from Spigot-Server-Patches/0064-Optimize-Pathfinding.patch rename to Spigot-Server-Patches/0063-Optimize-Pathfinding.patch index 9cc1226f85..308390f4d8 100644 --- a/Spigot-Server-Patches/0064-Optimize-Pathfinding.patch +++ b/Spigot-Server-Patches/0063-Optimize-Pathfinding.patch @@ -1,4 +1,4 @@ -From 256441becb43b3929f3c9eb8c4f74853e3540465 Mon Sep 17 00:00:00 2001 +From f0c6ad6334511ad4bc91aea310e08c72501d62aa Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:02:07 -0600 Subject: [PATCH] Optimize Pathfinding diff --git a/Spigot-Server-Patches/0065-Optimize-getBlockData.patch b/Spigot-Server-Patches/0064-Optimize-getBlockData.patch similarity index 94% rename from Spigot-Server-Patches/0065-Optimize-getBlockData.patch rename to Spigot-Server-Patches/0064-Optimize-getBlockData.patch index 99858c97ed..2f679bc59d 100644 --- a/Spigot-Server-Patches/0065-Optimize-getBlockData.patch +++ b/Spigot-Server-Patches/0064-Optimize-getBlockData.patch @@ -1,4 +1,4 @@ -From cb40c347cc1e86c85969dcb35f78a8a2e2787e24 Mon Sep 17 00:00:00 2001 +From 4f257ef83902bca1da8e046c6873c9cef158fdeb Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 02:07:55 -0600 Subject: [PATCH] Optimize getBlockData diff --git a/Spigot-Server-Patches/0066-Avoid-hopper-searches-if-there-are-no-items.patch b/Spigot-Server-Patches/0065-Avoid-hopper-searches-if-there-are-no-items.patch similarity index 98% rename from Spigot-Server-Patches/0066-Avoid-hopper-searches-if-there-are-no-items.patch rename to Spigot-Server-Patches/0065-Avoid-hopper-searches-if-there-are-no-items.patch index 00c73e775f..388fe9b81e 100644 --- a/Spigot-Server-Patches/0066-Avoid-hopper-searches-if-there-are-no-items.patch +++ b/Spigot-Server-Patches/0065-Avoid-hopper-searches-if-there-are-no-items.patch @@ -1,4 +1,4 @@ -From cbecbf14837ed3904880ad65134d0e0563f8e0c8 Mon Sep 17 00:00:00 2001 +From 845496e20e174f87fba207a48fe7b4993ad59dac Mon Sep 17 00:00:00 2001 From: CullanP Date: Thu, 3 Mar 2016 02:13:38 -0600 Subject: [PATCH] Avoid hopper searches if there are no items diff --git a/Spigot-Server-Patches/0067-Expose-server-CommandMap.patch b/Spigot-Server-Patches/0066-Expose-server-CommandMap.patch similarity index 90% rename from Spigot-Server-Patches/0067-Expose-server-CommandMap.patch rename to Spigot-Server-Patches/0066-Expose-server-CommandMap.patch index 525862c47d..7f3b8a797e 100644 --- a/Spigot-Server-Patches/0067-Expose-server-CommandMap.patch +++ b/Spigot-Server-Patches/0066-Expose-server-CommandMap.patch @@ -1,4 +1,4 @@ -From 8bd701f289231b752207b68ef72b9b48d4bfb57f Mon Sep 17 00:00:00 2001 +From 871ec0828e63e11f2b69dfba6a1fb30c0591f7e5 Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:15:57 -0600 Subject: [PATCH] Expose server CommandMap diff --git a/Spigot-Server-Patches/0068-Be-a-bit-more-informative-in-maxHealth-exception.patch b/Spigot-Server-Patches/0067-Be-a-bit-more-informative-in-maxHealth-exception.patch similarity index 95% rename from Spigot-Server-Patches/0068-Be-a-bit-more-informative-in-maxHealth-exception.patch rename to Spigot-Server-Patches/0067-Be-a-bit-more-informative-in-maxHealth-exception.patch index 861a867c2a..559c04cd1e 100644 --- a/Spigot-Server-Patches/0068-Be-a-bit-more-informative-in-maxHealth-exception.patch +++ b/Spigot-Server-Patches/0067-Be-a-bit-more-informative-in-maxHealth-exception.patch @@ -1,4 +1,4 @@ -From 3551594da49109bd71a1b0905276ad2adf38f443 Mon Sep 17 00:00:00 2001 +From 919e7babbeed909d2b51a4e1764f673cd1132070 Mon Sep 17 00:00:00 2001 From: kashike Date: Thu, 3 Mar 2016 02:18:39 -0600 Subject: [PATCH] Be a bit more informative in maxHealth exception diff --git a/Spigot-Server-Patches/0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch b/Spigot-Server-Patches/0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch similarity index 95% rename from Spigot-Server-Patches/0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch rename to Spigot-Server-Patches/0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch index cf4b6f7532..f4bc9a985c 100644 --- a/Spigot-Server-Patches/0069-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch +++ b/Spigot-Server-Patches/0068-Graduate-bungeecord-chat-API-from-spigot-subclasses.patch @@ -1,4 +1,4 @@ -From 32bd67a83257d049363c34c5ab7bbf3ce08937f8 Mon Sep 17 00:00:00 2001 +From 164d4efd8bef430906450337ea83a07ed3de97f2 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Mar 2016 02:21:58 -0600 Subject: [PATCH] Graduate bungeecord chat API from spigot subclasses @@ -32,7 +32,7 @@ index 76f50ae..cb9906a 100644 @Deprecated public OfflinePlayer getOfflinePlayer(String name) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a2f2b8e..c37ad0e 100644 +index 582ab4c..10bf160 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -156,6 +156,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0070-Player-Tab-List-and-Title-APIs.patch b/Spigot-Server-Patches/0069-Player-Tab-List-and-Title-APIs.patch similarity index 99% rename from Spigot-Server-Patches/0070-Player-Tab-List-and-Title-APIs.patch rename to Spigot-Server-Patches/0069-Player-Tab-List-and-Title-APIs.patch index 016e0f801b..110d497820 100644 --- a/Spigot-Server-Patches/0070-Player-Tab-List-and-Title-APIs.patch +++ b/Spigot-Server-Patches/0069-Player-Tab-List-and-Title-APIs.patch @@ -1,11 +1,11 @@ -From dcc0b3337d42767dacea1910dd3b872e27cd2199 Mon Sep 17 00:00:00 2001 +From f8f6d2cf300230c54f07ed0ff7d90fe6f6a96f3d Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 02:32:10 -0600 Subject: [PATCH] Player Tab List and Title APIs diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e139217..3d5bccd 100644 +index 10bf160..d9fab10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1,5 +1,6 @@ diff --git a/Spigot-Server-Patches/0071-Ensure-inv-drag-is-in-bounds.patch b/Spigot-Server-Patches/0070-Ensure-inv-drag-is-in-bounds.patch similarity index 91% rename from Spigot-Server-Patches/0071-Ensure-inv-drag-is-in-bounds.patch rename to Spigot-Server-Patches/0070-Ensure-inv-drag-is-in-bounds.patch index aa65e1b56b..1f1eea7be4 100644 --- a/Spigot-Server-Patches/0071-Ensure-inv-drag-is-in-bounds.patch +++ b/Spigot-Server-Patches/0070-Ensure-inv-drag-is-in-bounds.patch @@ -1,4 +1,4 @@ -From 29ce8dbfe8bfe2f0a8c99ad9613ea903615f36cf Mon Sep 17 00:00:00 2001 +From 0ece26ab85eb8ce79e3b55e84087294022848cd3 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:33:53 -0600 Subject: [PATCH] Ensure inv drag is in bounds diff --git a/Spigot-Server-Patches/0072-Change-implementation-of-tile-entity-removal-list.patch b/Spigot-Server-Patches/0071-Change-implementation-of-tile-entity-removal-list.patch similarity index 97% rename from Spigot-Server-Patches/0072-Change-implementation-of-tile-entity-removal-list.patch rename to Spigot-Server-Patches/0071-Change-implementation-of-tile-entity-removal-list.patch index 77c60173e6..37a657568e 100644 --- a/Spigot-Server-Patches/0072-Change-implementation-of-tile-entity-removal-list.patch +++ b/Spigot-Server-Patches/0071-Change-implementation-of-tile-entity-removal-list.patch @@ -1,4 +1,4 @@ -From d9842022cfac2ac27871dc3b363954d3492528cc Mon Sep 17 00:00:00 2001 +From b7b272567560e4947474b209356f87aa194beab8 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:39:54 -0600 Subject: [PATCH] Change implementation of (tile)entity removal list diff --git a/Spigot-Server-Patches/0073-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0072-Add-configurable-portal-search-radius.patch similarity index 97% rename from Spigot-Server-Patches/0073-Add-configurable-portal-search-radius.patch rename to Spigot-Server-Patches/0072-Add-configurable-portal-search-radius.patch index f981f1f17b..09c9e822a6 100644 --- a/Spigot-Server-Patches/0073-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0072-Add-configurable-portal-search-radius.patch @@ -1,4 +1,4 @@ -From 3c621cdd6f9b2d60e89eaa913d9463294df3af1e Mon Sep 17 00:00:00 2001 +From e723a6c4e1cff0a81d30ef7bb0b17ff361b86520 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:46:17 -0600 Subject: [PATCH] Add configurable portal search radius @@ -45,7 +45,7 @@ index 7c8df40..22c94d1 100644 blockposition1 = blockposition2.down(); if (this.world.getType(blockposition2).getBlock() == Blocks.PORTAL) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3567133..9da5719 100644 +index 66b7e77..1ef9987 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -60,7 +60,7 @@ public class WorldServer extends World implements IAsyncTaskHandler { diff --git a/Spigot-Server-Patches/0074-Add-velocity-warnings.patch b/Spigot-Server-Patches/0073-Add-velocity-warnings.patch similarity index 94% rename from Spigot-Server-Patches/0074-Add-velocity-warnings.patch rename to Spigot-Server-Patches/0073-Add-velocity-warnings.patch index 1262e11830..4568381313 100644 --- a/Spigot-Server-Patches/0074-Add-velocity-warnings.patch +++ b/Spigot-Server-Patches/0073-Add-velocity-warnings.patch @@ -1,4 +1,4 @@ -From bce742ca6f95614f70210094ec75efaa1b49d13c Mon Sep 17 00:00:00 2001 +From 9847b8d2a13d30029cee4553416c745d6a8b237c Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 02:48:12 -0600 Subject: [PATCH] Add velocity warnings diff --git a/Spigot-Server-Patches/0075-Fix-inter-world-teleportation-glitches.patch b/Spigot-Server-Patches/0074-Fix-inter-world-teleportation-glitches.patch similarity index 96% rename from Spigot-Server-Patches/0075-Fix-inter-world-teleportation-glitches.patch rename to Spigot-Server-Patches/0074-Fix-inter-world-teleportation-glitches.patch index ef1d3c6d65..93a9dabd35 100644 --- a/Spigot-Server-Patches/0075-Fix-inter-world-teleportation-glitches.patch +++ b/Spigot-Server-Patches/0074-Fix-inter-world-teleportation-glitches.patch @@ -1,4 +1,4 @@ -From 9434875bc68169f237fd9e2088bf99b0e0c2650f Mon Sep 17 00:00:00 2001 +From c38bb352f98246e32fc34760d79cadf64a5eab1a Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Thu, 3 Mar 2016 02:50:31 -0600 Subject: [PATCH] Fix inter-world teleportation glitches @@ -25,7 +25,7 @@ index f42efe7..c5c49bf 100644 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3d5bccd..79f5352 100644 +index d9fab10..51c971f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -553,7 +553,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/Spigot-Server-Patches/0076-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0075-Add-exception-reporting-event.patch similarity index 99% rename from Spigot-Server-Patches/0076-Add-exception-reporting-event.patch rename to Spigot-Server-Patches/0075-Add-exception-reporting-event.patch index 051f247edf..c868da0527 100644 --- a/Spigot-Server-Patches/0076-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0075-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From 7437a350b5016312d44dd9cb22a39994063342ab Mon Sep 17 00:00:00 2001 +From 64d63acdd2ab0ce767bffc9c1e7f683d21932ce0 Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event diff --git a/Spigot-Server-Patches/0077-Temp-patch-to-nuke-BeaconEffectEvent-until-we-get-so.patch b/Spigot-Server-Patches/0076-Temp-patch-to-nuke-BeaconEffectEvent-until-we-get-so.patch similarity index 98% rename from Spigot-Server-Patches/0077-Temp-patch-to-nuke-BeaconEffectEvent-until-we-get-so.patch rename to Spigot-Server-Patches/0076-Temp-patch-to-nuke-BeaconEffectEvent-until-we-get-so.patch index 0932a7c655..bcde977ea9 100644 --- a/Spigot-Server-Patches/0077-Temp-patch-to-nuke-BeaconEffectEvent-until-we-get-so.patch +++ b/Spigot-Server-Patches/0076-Temp-patch-to-nuke-BeaconEffectEvent-until-we-get-so.patch @@ -1,4 +1,4 @@ -From 1d5a9281412eb02af76aaa116280e5e02c987d6d Mon Sep 17 00:00:00 2001 +From f0f541994c80d95ab31cb898ddb4debbae47b003 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Thu, 3 Mar 2016 04:45:26 -0600 Subject: [PATCH] Temp patch to nuke BeaconEffectEvent until we get some sleep diff --git a/Spigot-Server-Patches/0077-Chunk-save-queue-improvements.patch b/Spigot-Server-Patches/0077-Chunk-save-queue-improvements.patch new file mode 100644 index 0000000000..be648fe894 --- /dev/null +++ b/Spigot-Server-Patches/0077-Chunk-save-queue-improvements.patch @@ -0,0 +1,169 @@ +From 15f73df80f65604080b217caa144ce218bffc96f Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Fri, 4 Mar 2016 18:18:37 -0600 +Subject: [PATCH] Chunk save queue improvements + +For some unknown reason, Minecraft is sleeping 10ms between every single chunk being saved to disk. +Under high chunk load/unload activity (lots of movement / teleporting), this causes the chunk unload queue +to build up in size. + +This has multiple impacts: +1) Performance of the unload queue itself - The save thread is pretty ineffecient for how it accesses it + By letting the queue get larger, checking and popping work off the queue can get less performant. +2) Performance of chunk loading - As with #1, chunk loads also have to check this queue when loading + chunk data so that it doesn't load stale data if new data is pending write to disk. +3) Memory Usage - The entire chunk has been serialized to NBT, and now sits in this queue. This leads to + elevated memory usage, and then the objects used in the serialization sit around longer than needed, + resulting in promotion to Old Generation instead of dying young. + +If there is work to do, then the thread should be doing its work, and only sleep when it is done. + +Additionally, optimize the ChunkRegionLoader queue to reduce lock contention (issue with 1.9) + +diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java +index 62f4631..ed49d83 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java ++++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +@@ -164,4 +164,10 @@ public class PaperConfig { + } + return time; + } ++ ++ public static boolean enableFileIOThreadSleep; ++ private static void enableFileIOThreadSleep() { ++ enableFileIOThreadSleep = getBoolean("settings.sleep-between-chunk-saves", false); ++ if (enableFileIOThreadSleep) Bukkit.getLogger().info("Enabled sleeping between chunk saves, beware of memory issues"); ++ } + } +diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +index 5bd6ce0..336e780 100644 +--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java ++++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java +@@ -11,14 +11,17 @@ import java.util.List; + import java.util.Map; + import java.util.Set; + import java.util.concurrent.ConcurrentHashMap; ++import java.util.concurrent.ConcurrentLinkedQueue; // Paper + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + + public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + ++ private ConcurrentLinkedQueue queue = new ConcurrentLinkedQueue(); // Paper - Chunk queue improvements ++ private final Object lock = new Object(); // Paper - Chunk queue improvements + private static final Logger a = LogManager.getLogger(); + private Map b = new ConcurrentHashMap(); +- private Set c = Collections.newSetFromMap(new ConcurrentHashMap()); ++ //private Set c = Collections.newSetFromMap(new ConcurrentHashMap()); // Paper - Chunk queue improvements + private final File d; + private final DataConverterManager e; + private boolean f = false; +@@ -32,11 +35,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + public boolean chunkExists(World world, int i, int j) { + ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j); + +- if (this.c.contains(chunkcoordintpair)) { ++ //if (this.c.contains(chunkcoordintpair)) { // Paper - Chunk queue improvements + if (this.b.containsKey(chunkcoordintpair)) { + return true; + } +- } ++ //} // Paper - Chunk queue improvements + + // Paper start - Don't create region files when checking that they exist + final RegionFile region = RegionFileCache.a(this.d, i, j, false); +@@ -139,28 +142,32 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + } + + protected void a(ChunkCoordIntPair chunkcoordintpair, NBTTagCompound nbttagcompound) { +- if (!this.c.contains(chunkcoordintpair)) { ++ synchronized (lock) { // Paper - Chunk queue improvements + this.b.put(chunkcoordintpair, nbttagcompound); + } ++ queue.add(new QueuedChunk(chunkcoordintpair, nbttagcompound)); // Paper - Chunk queue improvements + + FileIOThread.a().a(this); + } + + public boolean c() { +- if (this.b.isEmpty()) { ++ // Paper start - Chunk queue improvements ++ QueuedChunk chunk = queue.poll(); ++ if (chunk == null) { ++ // Paper - end + if (this.f) { + ChunkRegionLoader.a.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", new Object[] { this.d.getName()}); + } + + return false; + } else { +- ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) this.b.keySet().iterator().next(); ++ ChunkCoordIntPair chunkcoordintpair = chunk.coords; // Paper - Chunk queue improvements + + boolean flag; + + try { +- this.c.add(chunkcoordintpair); +- NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.remove(chunkcoordintpair); ++ //this.c.add(chunkcoordintpair); ++ NBTTagCompound nbttagcompound = chunk.compound; // Paper - Chunk queue improvements + + if (nbttagcompound != null) { + try { +@@ -169,10 +176,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + ChunkRegionLoader.a.error("Failed to save chunk", exception); + } + } ++ synchronized (lock) { if (this.b.get(chunkcoordintpair) == nbttagcompound) { this.b.remove(chunkcoordintpair); } }// Paper - This will not equal if a newer version is still pending + + flag = true; + } finally { +- this.c.remove(chunkcoordintpair); ++ //this.c.remove(chunkcoordintpair); // Paper + } + + return flag; +@@ -503,4 +511,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { + return entity; + } + } ++ ++ // Paper start - Chunk queue improvements ++ private static class QueuedChunk { ++ public ChunkCoordIntPair coords; ++ public NBTTagCompound compound; ++ ++ public QueuedChunk(ChunkCoordIntPair coords, NBTTagCompound compound) { ++ this.coords = coords; ++ this.compound = compound; ++ } ++ } ++ // Paper end + } +diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java +index 198b00f..d997dd4 100644 +--- a/src/main/java/net/minecraft/server/FileIOThread.java ++++ b/src/main/java/net/minecraft/server/FileIOThread.java +@@ -39,11 +39,15 @@ public class FileIOThread implements Runnable { + ++this.d; + } + +- try { +- Thread.sleep(this.e ? 0L : 10L); +- } catch (InterruptedException interruptedexception) { +- interruptedexception.printStackTrace(); ++ // Paper start - Add toggle ++ if (com.destroystokyo.paper.PaperConfig.enableFileIOThreadSleep) { ++ try { ++ Thread.sleep(this.e ? 0L : 10L); ++ } catch (InterruptedException interruptedexception) { ++ interruptedexception.printStackTrace(); ++ } + } ++ // Paper end + } + + if (this.b.isEmpty()) { +-- +2.7.2 +