diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-05-31 19:16:15 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-05-31 19:55:28 -0500 |
commit | 894ea065676cbf32f47c99ce91d605fab52a7a5a (patch) | |
tree | d2f2676fc499f8832119011d3b85af2611c792a1 /src/main/java/net/minecraft/server/Path.java | |
parent | 9e5d6699f50bb77a5c322975cbcfa79445499646 (diff) | |
download | craftbukkit-894ea065676cbf32f47c99ce91d605fab52a7a5a.tar craftbukkit-894ea065676cbf32f47c99ce91d605fab52a7a5a.tar.gz craftbukkit-894ea065676cbf32f47c99ce91d605fab52a7a5a.tar.lz craftbukkit-894ea065676cbf32f47c99ce91d605fab52a7a5a.tar.xz craftbukkit-894ea065676cbf32f47c99ce91d605fab52a7a5a.zip |
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.
Diffstat (limited to 'src/main/java/net/minecraft/server/Path.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Path.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Path.java b/src/main/java/net/minecraft/server/Path.java index 9575e13d..28b01672 100644 --- a/src/main/java/net/minecraft/server/Path.java +++ b/src/main/java/net/minecraft/server/Path.java @@ -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() {} |