mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2025-01-01 05:57:57 +01:00
Temporarily increase write buffer size
This commit is contained in:
parent
6db70e6058
commit
f098dba70a
@ -84,6 +84,9 @@ public class MCAFile2LevelDB extends MapConverter {
|
||||
try (PrintStream out = new PrintStream(new FileOutputStream(new File(folderTo, "levelname.txt")))) {
|
||||
out.print(worldName);
|
||||
}
|
||||
|
||||
// long presumableFreeMemory = Runtime.getRuntime().maxMemory() - allocatedMemory;
|
||||
|
||||
this.pool = new ForkJoinPool();
|
||||
this.remapper = new ClipboardRemapper(ClipboardRemapper.RemapPlatform.PC, ClipboardRemapper.RemapPlatform.PE);
|
||||
BundledBlockData.getInstance().loadFromResource();
|
||||
@ -93,7 +96,7 @@ public class MCAFile2LevelDB extends MapConverter {
|
||||
.verifyChecksums(false)
|
||||
.blockSize(262144) // 256K
|
||||
.cacheSize(8388608) // 8MB
|
||||
.writeBufferSize(134217728) // >=128MB
|
||||
.writeBufferSize(1342177280) // >=128MB
|
||||
);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
@ -149,6 +152,7 @@ public class MCAFile2LevelDB extends MapConverter {
|
||||
" - Any custom generator settings may not work\n" +
|
||||
" - May not match up with new terrain"
|
||||
);
|
||||
Fawe.debug("Starting compaction");
|
||||
compact();
|
||||
app.prompt("Compaction complete!");
|
||||
}
|
||||
@ -261,9 +265,7 @@ public class MCAFile2LevelDB extends MapConverter {
|
||||
}
|
||||
}
|
||||
}
|
||||
pool.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
pool.submit((Runnable) () -> {
|
||||
try {
|
||||
update(getKey(chunk, Tag.Version), VERSION);
|
||||
update(getKey(chunk, Tag.FinalizedState), COMPLETE_STATE);
|
||||
@ -314,7 +316,7 @@ public class MCAFile2LevelDB extends MapConverter {
|
||||
|
||||
if (!chunk.entities.isEmpty()) {
|
||||
List<com.sk89q.jnbt.Tag> entities = new ArrayList<>();
|
||||
for (com.sk89q.jnbt.CompoundTag tag : chunk.getEntities()) {
|
||||
for (CompoundTag tag : chunk.getEntities()) {
|
||||
transform(chunk, tag);
|
||||
entities.add(tag);
|
||||
}
|
||||
@ -355,7 +357,6 @@ public class MCAFile2LevelDB extends MapConverter {
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user