Further optimize Registry w/ still fixes test

This commit is contained in:
Sotr
2019-03-05 00:08:53 +08:00
parent 5ae246d661
commit 8ddafae86a
6 changed files with 10 additions and 9 deletions

View File

@@ -1384,7 +1384,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
timings.tileEntityTick.startTiming(); // Spigot
if (!this.tileEntityListUnload.isEmpty()) {
// Paper start - Use alternate implementation with faster contains
java.util.Set<TileEntity> toRemove = com.koloboke.collect.set.hash.HashObjSets.getDefaultFactory().withHashConfig(com.koloboke.collect.hash.HashConfig.fromLoads(1./3., 2./3., 2./3.)).withNullKeyAllowed(true).withEquivalence(com.koloboke.collect.Equivalence.identity()).newImmutableSet(tileEntityListUnload); // Akarin - koloboke
java.util.Set<TileEntity> toRemove = com.koloboke.collect.set.hash.HashObjSets.getDefaultFactory().withNullKeyAllowed(true).withEquivalence(com.koloboke.collect.Equivalence.identity()).newImmutableSet(tileEntityListUnload); // Akarin - koloboke
//toRemove.addAll(tileEntityListUnload); // Akarin - koloboke
this.tileEntityListTick.removeAll(toRemove);
// Paper end