mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 04:56:50 +01:00
Reduce default size of path array. Addresses BUKKIT-1469.
The Path object creates an array of 1024 PathPoint objects as the backing for a sorted queue but testing shows we tend to get only 80 or so entries in the array at most. To save memory this changes the default size of the array to 128. Changing it to 64 was considered but that triggered too many resizes which is detremental to performance.
This commit is contained in:
parent
9e5d6699f5
commit
894ea06567
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ package net.minecraft.server;
|
|||
|
||||
public class Path {
|
||||
|
||||
private PathPoint[] a = new PathPoint[1024];
|
||||
private PathPoint[] a = new PathPoint[128]; // CraftBukkit - reduce default size
|
||||
private int b = 0;
|
||||
|
||||
public Path() {}
|
||||
|
|
Loading…
Reference in a new issue