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

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/block/entity/SkullBlockEntity.java
+++ b/net/minecraft/world/level/block/entity/SkullBlockEntity.java
@@ -105,7 +105,7 @@
ProfileResult profileResult = apiServices.sessionService().fetchProfile(uuid, true);
return Optional.ofNullable(profileResult).map(ProfileResult::profile);
}
- }, Util.backgroundExecutor().forName("fetchProfile"));
+ }, Util.PROFILE_EXECUTOR); // Paper - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
}
public static void clear() {