Cache PropertyInfoRequests in getStandardChildDomainPropertyVariables 84/2584/2
authorjsimomaa <jani.simomaa@gmail.com>
Mon, 24 Dec 2018 21:03:31 +0000 (23:03 +0200)
committerJani Simomaa <jani.simomaa@semantum.fi>
Mon, 24 Dec 2018 21:03:52 +0000 (21:03 +0000)
gitlab #5

Change-Id: Ia893c931bcab5adfb30d60d0caf109046f36e68a

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/function/All.java

index f93023b77ccd36a6db7d44af8d9981f4a47fc983..4e775e08a22e12597044218f138aef3cfcaf6637 100644 (file)
@@ -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.<PropertyInfo>instance()) :
-                                               graph.syncRequest(new PropertyInfoRequest(predicate));
+                       PropertyInfo info = //graph.isImmutable(predicate) ?
+                                       graph.syncRequest(new PropertyInfoRequest(predicate), TransientCacheAsyncListener.<PropertyInfo>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<String, PropertyInfo> predicates = graph.syncRequest(new UnescapedPropertyMapOfResource(context));
+               Map<String, PropertyInfo> predicates = graph.syncRequest(new UnescapedPropertyMapOfResource(context), TransientCacheListener.instance());
                return predicates.get(name);
        }