From: jsimomaa Date: Mon, 24 Dec 2018 21:03:31 +0000 (+0200) Subject: Cache PropertyInfoRequests in getStandardChildDomainPropertyVariables X-Git-Tag: v1.43.0~136^2~214 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F2584%2F2;p=simantics%2Fplatform.git Cache PropertyInfoRequests in getStandardChildDomainPropertyVariables gitlab #5 Change-Id: Ia893c931bcab5adfb30d60d0caf109046f36e68a --- diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/function/All.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/function/All.java index f93023b77..4e775e08a 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/function/All.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/function/All.java @@ -570,9 +570,9 @@ public class All { // Process graph properties for(Resource predicate : predicates) { - PropertyInfo info = graph.isImmutable(predicate) ? - graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.instance()) : - graph.syncRequest(new PropertyInfoRequest(predicate)); + PropertyInfo info = //graph.isImmutable(predicate) ? + graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.instance());// : + //graph.syncRequest(new PropertyInfoRequest(predicate)); if(!info.isHasProperty) continue; @@ -992,7 +992,7 @@ public class All { public static PropertyInfo getPossiblePropertyInfoFromContext(ReadGraph graph, Variable variable, Resource context, String name) throws DatabaseException { if(context == null) return null; - Map predicates = graph.syncRequest(new UnescapedPropertyMapOfResource(context)); + Map predicates = graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheListener.instance()); return predicates.get(name); }