Paper 1.13 Backport: Optimize Region File Cache
This commit is contained in:
@@ -94,7 +94,7 @@ public class RegionFileCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start - call sites hoisted for synchronization
|
// CraftBukkit start - call sites hoisted for synchronization
|
||||||
public static synchronized NBTTagCompound d(File file, int i, int j) throws IOException { // OBFHELPER: read
|
public static /*synchronized*/ NBTTagCompound d(File file, int i, int j) throws IOException { // Akarin - remove synchronization // OBFHELPER: read
|
||||||
RegionFile regionfile = a(file, i, j);
|
RegionFile regionfile = a(file, i, j);
|
||||||
|
|
||||||
DataInputStream datainputstream = regionfile.a(i & 31, j & 31);
|
DataInputStream datainputstream = regionfile.a(i & 31, j & 31);
|
||||||
@@ -106,7 +106,7 @@ public class RegionFileCache {
|
|||||||
return NBTCompressedStreamTools.a(datainputstream);
|
return NBTCompressedStreamTools.a(datainputstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized void e(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { // OBFHELPER: write
|
public static /*synchronized*/ void e(File file, int i, int j, NBTTagCompound nbttagcompound) throws IOException { // Akarin - remove synchronization // OBFHELPER: write
|
||||||
RegionFile regionfile = a(file, i, j);
|
RegionFile regionfile = a(file, i, j);
|
||||||
|
|
||||||
DataOutputStream dataoutputstream = regionfile.b(i & 31, j & 31);
|
DataOutputStream dataoutputstream = regionfile.b(i & 31, j & 31);
|
||||||
@@ -115,7 +115,7 @@ public class RegionFileCache {
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public static synchronized boolean chunkExists(File file, int i, int j) {
|
public static /*synchronized*/ boolean chunkExists(File file, int i, int j) { // Akarin - remove synchronization
|
||||||
RegionFile regionfile = b(file, i, j);
|
RegionFile regionfile = b(file, i, j);
|
||||||
|
|
||||||
return regionfile != null ? regionfile.c(i & 31, j & 31) : false;
|
return regionfile != null ? regionfile.c(i & 31, j & 31) : false;
|
||||||
|
|||||||
Reference in New Issue
Block a user