X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Fprocedures%2FCompactify.java;fp=bundles%2Forg.simantics.graph.compiler%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fcompiler%2Finternal%2Fprocedures%2FCompactify.java;h=7b647806d87947ee25ee01a01152a90da44d18f2;hp=82fd5798c09dff76c6e23db5b2979358291e8221;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 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