Propagate stateByID scaling performance improvement

This commit is contained in:
Mike Primm 2021-03-14 12:08:07 -05:00
parent aef7a16b1c
commit 0809d23559
14 changed files with 13 additions and 14 deletions

View file

@ -239,7 +239,7 @@ 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%
Arrays.fill(stateByID, plen, stateByID.length, DynmapBlockState.AIR);
}
Block b = bs.getBlock();