X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Fprocedures%2FCompactify.java;h=7b647806d87947ee25ee01a01152a90da44d18f2;hb=c2ab38c94029486a379c79a7b38604f1c03afa44;hp=82fd5798c09dff76c6e23db5b2979358291e8221;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/Compactify.java b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/Compactify.java index 82fd5798c..7b647806d 100644 --- a/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/Compactify.java +++ b/bundles/org.simantics.graph.compiler/src/org/simantics/graph/compiler/internal/procedures/Compactify.java @@ -1,32 +1,32 @@ -package org.simantics.graph.compiler.internal.procedures; - -import gnu.trove.map.hash.TIntIntHashMap; - -import org.simantics.graph.store.GraphStore; - -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