13
0
geforkt von Mirrors/Velocity

Bump the pool buffer size to 4MiB temporarily

Dieser Commit ist enthalten in:
Andrew Steinborn 2019-01-19 03:02:50 -05:00
Ursprung e2f93c6ac6
Commit 865f9e5ef9

Datei anzeigen

@ -14,14 +14,14 @@ public class Velocity {
System.setProperty("java.awt.headless", "true"); System.setProperty("java.awt.headless", "true");
// By default, Netty allocates 16MiB arenas for the PooledByteBufAllocator. This is too much // By default, Netty allocates 16MiB arenas for the PooledByteBufAllocator. This is too much
// memory for Minecraft, which imposes a maximum packet size of 2MiB! We'll use 2MiB as a more // memory for Minecraft, which imposes a maximum packet size of 2MiB! We'll use 4MiB as a more
// sane default. // sane default.
// //
// Note: io.netty.allocator.pageSize << io.netty.allocator.maxOrder is the formula used to // Note: io.netty.allocator.pageSize << io.netty.allocator.maxOrder is the formula used to
// compute the chunk size. We lower maxOrder from its default of 11 to 8. (We also use a null // compute the chunk size. We lower maxOrder from its default of 11 to 8. (We also use a null
// check, so that the user is free to choose another setting if need be.) // check, so that the user is free to choose another setting if need be.)
if (System.getProperty("io.netty.allocator.maxOrder") == null) { if (System.getProperty("io.netty.allocator.maxOrder") == null) {
System.setProperty("io.netty.allocator.maxOrder", "8"); System.setProperty("io.netty.allocator.maxOrder", "9");
} }
} }