package org.simantics.graph.compiler.internal.procedures; import org.simantics.graph.store.GraphStore; import gnu.trove.map.hash.TIntIntHashMap; public class Compactify implements Runnable { GraphStore store; public Compactify(GraphStore store) { this.store = store; } @Override public void run() { // Mark all used resources int resourceCount = store.identities.getResourceCount(); final boolean[] temp = new boolean[resourceCount]; store.collectReferences(temp); // Create a map int newResourceCount = 0; TIntIntHashMap map = new TIntIntHashMap(resourceCount); for(int i=0;i