if (existing.hasVirtual())
cluster.markVirtual();
- long existingImportance = existing.getImportance();
- if (existingImportance != 0)
- importanceMap.remove(existingImportance);
+ importanceMap.remove(existing.getImportance());
if (collectorPolicy != null)
collectorPolicy.removed((ClusterImpl)existing);
int ims = importanceMap.size();
int ihms = countImportantClusters();
-// System.out.format("[%s] Validating ClusterTable: byteSize=%d, hashMap=%d/%d, importanceMap=%d%n",
-// place, sizeInBytes, ihms, clusters.hashMap.size(), ims);
+// System.out.format("[ClusterTable.%s] Validating: byteSize=%d (%d MB), hashMap=%d/%d, importanceMap=%d%n",
+// place, sizeInBytes, sizeInBytes / (1024*1024), ihms, clusters.hashMap.size(), ims);
int i = clusterArray.length;
long size = 0;
this.clusterMap = new ClusterMap(foreignTable, flatTable);
this.clusterSupport = support;
this.clusterBits = ClusterTraitsBase.getClusterBits(clusterKey);
- this.importance = clusterTable.timeCounter();
+ this.importance = -clusterTable.timeCounter();
clusterTable.markImmutable(this, getImmutable());
}
void analyse() {
import fi.vtt.simantics.procore.internal.ClusterTable;
import fi.vtt.simantics.procore.internal.SessionImplSocket;
import gnu.trove.map.hash.TIntShortHashMap;
-import gnu.trove.procedure.TIntProcedure;
import gnu.trove.set.hash.TIntHashSet;
final public class ClusterSmall extends ClusterImpl {
}
if (deleted) return null; // Can't convert deleted cluster to big.
ClusterBig big = new ClusterBig(getClusterUID(), clusterKey, support);
+ big.setImportance(importance);
big.cc = this.cc;
big.cc.clusterImpl = this;
resourceTable.toBig(big, support, this);