mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 05:05:16 +01:00
Merge pull request #3309 from miiichael/patch-1
Resize stateByID by 10% instead of a single element at a time
This commit is contained in:
commit
aef7a16b1c
@ -239,7 +239,8 @@ public class DynmapPlugin
|
||||
int idx = bsids.getId(bs);
|
||||
if (idx >= stateByID.length) {
|
||||
int plen = stateByID.length;
|
||||
stateByID = Arrays.copyOf(stateByID, idx+1);
|
||||
stateByID = Arrays.copyOf(stateByID, idx*11/10); // grow array by 10%
|
||||
Log.debug("Resized stateByID from " + plen + " to " + stateByID.length);
|
||||
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
|
||||
}
|
||||
Block b = bs.getBlock();
|
||||
|
Loading…
Reference in New Issue
Block a user