mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Even more work
This commit is contained in:
parent
a894c3a437
commit
0e668caa27
3 changed files with 17 additions and 8 deletions
|
@ -43,11 +43,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
--- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
--- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java
|
||||||
@@ -0,0 +0,0 @@ public class DimensionDataStorage implements AutoCloseable {
|
@@ -0,0 +0,0 @@ public class DimensionDataStorage implements AutoCloseable {
|
||||||
} catch (IOException var3) {
|
} else {
|
||||||
LOGGER.error("Could not save data to {}", path.getFileName(), var3);
|
int i = Util.maxAllowedExecutorThreads();
|
||||||
}
|
int j = map.size();
|
||||||
- }, Util.ioPool());
|
- if (j > i) {
|
||||||
+ }, Util.DIMENSION_DATA_IO_POOL); // Paper - Separate dimension data IO pool
|
+ if (false && j > i) { // Paper - Separate dimension data IO pool; just throw them into the fixed pool queue
|
||||||
}
|
this.pendingWriteFuture = this.pendingWriteFuture.thenCompose(object -> {
|
||||||
|
List<CompletableFuture<?>> list = new ArrayList<>(i);
|
||||||
public void saveAndJoin() {
|
int k = Mth.positiveCeilDiv(j, i);
|
||||||
|
@@ -0,0 +0,0 @@ public class DimensionDataStorage implements AutoCloseable {
|
||||||
|
v -> CompletableFuture.allOf(
|
||||||
|
map.entrySet()
|
||||||
|
.stream()
|
||||||
|
- .map(entry -> CompletableFuture.runAsync(() -> tryWrite(entry.getKey(), entry.getValue()), Util.ioPool()))
|
||||||
|
+ .map(entry -> CompletableFuture.runAsync(() -> tryWrite(entry.getKey(), entry.getValue()), Util.DIMENSION_DATA_IO_POOL)) // Paper - Separate dimension data IO pool
|
||||||
|
.toArray(CompletableFuture[]::new)
|
||||||
|
)
|
||||||
|
);
|
Loading…
Reference in a new issue