mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Fix memory leak in proto chunk change
This commit is contained in:
parent
77c51f1785
commit
7349a434ad
1 changed files with 14 additions and 23 deletions
|
@ -7,30 +7,8 @@ These chunks are unfinished, and waste cpu time saving these unfinished chunks.
|
|||
the loadChunk method refuses to acknoledge they exists, and will restart
|
||||
a new chunk generation process to begin with, so saving them serves no benefit.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index fd8430a68f..b425704b1a 100644
|
||||
--- a/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 {
|
||||
public boolean a(boolean flag) {
|
||||
int i = 0;
|
||||
|
||||
- this.f.a();
|
||||
+ //this.f.a(); // Paper - don't save proto chunks
|
||||
ArrayList arraylist = Lists.newArrayList(this.chunks.values());
|
||||
Iterator iterator = arraylist.iterator();
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
- this.f.a();
|
||||
+ //this.f.a(); // Paper - don't save proto chunks
|
||||
this.chunkLoader.b();
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index ea8684747d..a97e024ec4 100644
|
||||
index ea8684747..a97e024ec 100644
|
||||
--- a/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 {
|
||||
|
@ -41,4 +19,17 @@ index ea8684747d..a97e024ec4 100644
|
|||
// Spigot end
|
||||
world.checkSession();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
index 501565dd5..7b3068753 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
||||
protected boolean a(Scheduler.a scheduler_a) {
|
||||
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
|
||||
|
||||
- return !protochunk.ab_() && !protochunk.h();
|
||||
+ return !protochunk.ab_() /*&& !protochunk.h()*/; // Paper
|
||||
}
|
||||
});
|
||||
|
||||
--
|
Loading…
Reference in a new issue