mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 20:21:41 +01:00
Remove use of FastUtil for unload queue, very bad performance
This commit is contained in:
parent
337e7791a6
commit
89ff242bd4
@ -8,11 +8,11 @@ Adds a command line flag to enable stats on how chunk saves are processing.
|
|||||||
Stats on current queue, how many was processed and how many were queued.
|
Stats on current queue, how many was processed and how many were queued.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 19f10fed..9159ed02 100644
|
index ef194312b..8fca62eec 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||||
public final it.unimi.dsi.fastutil.longs.LongSet unloadQueue = new it.unimi.dsi.fastutil.longs.LongArraySet(); // PAIL: private -> public // Paper
|
public final Set<Long> unloadQueue = Sets.newHashSet();
|
||||||
public final ChunkGenerator chunkGenerator;
|
public final ChunkGenerator chunkGenerator;
|
||||||
private final IChunkLoader chunkLoader;
|
private final IChunkLoader chunkLoader;
|
||||||
+ // Paper start - chunk save stats
|
+ // Paper start - chunk save stats
|
||||||
@ -55,7 +55,7 @@ index 19f10fed..9159ed02 100644
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index ceef6e45..d275eb19 100644
|
index ceef6e456..d275eb194 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
|
@ -12,21 +12,8 @@ and could not create anything faster than fastutil.
|
|||||||
These collections are super fast as seen
|
These collections are super fast as seen
|
||||||
http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/
|
http://java-performance.info/hashmap-overview-jdk-fastutil-goldman-sachs-hppc-koloboke-trove-january-2015/
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
||||||
index c81b404b..4d0cb971 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
||||||
@@ -0,0 +0,0 @@ import org.bukkit.event.world.ChunkUnloadEvent;
|
|
||||||
public class ChunkProviderServer implements IChunkProvider {
|
|
||||||
|
|
||||||
private static final Logger a = LogManager.getLogger();
|
|
||||||
- public final Set<Long> unloadQueue = Sets.newHashSet();
|
|
||||||
+ public final it.unimi.dsi.fastutil.longs.LongSet unloadQueue = new it.unimi.dsi.fastutil.longs.LongArraySet(); // PAIL: private -> public // Paper
|
|
||||||
public final ChunkGenerator chunkGenerator;
|
|
||||||
private final IChunkLoader chunkLoader;
|
|
||||||
// Paper start
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java
|
diff --git a/src/main/java/net/minecraft/server/DataWatcher.java b/src/main/java/net/minecraft/server/DataWatcher.java
|
||||||
index 1507f97f..fe848445 100644
|
index 1507f97fd..fe8484453 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataWatcher.java
|
--- a/src/main/java/net/minecraft/server/DataWatcher.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataWatcher.java
|
+++ b/src/main/java/net/minecraft/server/DataWatcher.java
|
||||||
@@ -0,0 +0,0 @@ import java.util.Map;
|
@@ -0,0 +0,0 @@ import java.util.Map;
|
||||||
|
Loading…
Reference in New Issue
Block a user