[ci skip] Add more patch identifying comments

This commit is contained in:
Nassim Jahnke 2024-01-23 14:34:17 +01:00
parent 484d6bfb4e
commit 52619e7a21
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
99 changed files with 360 additions and 393 deletions

View file

@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Antony Riley <antony@cyberiantiger.org>
Date: Tue, 29 Mar 2016 08:22:55 +0300
Subject: [PATCH] Sanitise RegionFileCache and make configurable.
Subject: [PATCH] Sanitise RegionFileCache and make configurable
RegionFileCache prior to this patch would close every single open region
file upon reaching a size of 256.
@ -11,7 +11,7 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
The maximum size of the RegionFileCache is also made configurable.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 2d00333f25828ef5912c925d1213a56c564d85c9..465ad0bae446a20e941e8f2dbf2d85f2627482b9 100644
index fa592d5db10dbd4824de74658655ef61230ed431..e9cfbee008c1dda2eeac55196d490984fa62ab09 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -92,7 +92,7 @@ public class RegionFileStorage implements AutoCloseable {
@ -19,7 +19,7 @@ index 2d00333f25828ef5912c925d1213a56c564d85c9..465ad0bae446a20e941e8f2dbf2d85f2
}
// Paper end - cache regionfile does not exist state
- if (this.regionCache.size() >= 256) {
+ if (this.regionCache.size() >= io.papermc.paper.configuration.GlobalConfiguration.get().misc.regionFileCacheSize) { // Paper - configurable
+ if (this.regionCache.size() >= io.papermc.paper.configuration.GlobalConfiguration.get().misc.regionFileCacheSize) { // Paper - Sanitise RegionFileCache and make configurable.
((RegionFile) this.regionCache.removeLast()).close();
}