Do not submit profile lookups to worldgen threads

They block. On network I/O.

If enough tasks are submitted the server will eventually stall
out due to a sync load, as the worldgen threads will be
stalling on profile lookups.
This commit is contained in:
Spottedleaf
2021-08-08 16:26:46 -07:00
parent 8eb7ab6946
commit 40654111d1
4 changed files with 46 additions and 3 deletions

View File

@@ -161,7 +161,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
@Override
public CompletableFuture<PlayerProfile> update() {
return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.backgroundExecutor());
return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.PROFILE_EXECUTOR); // Paper - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
}
private CraftPlayerProfile getUpdatedProfile() {