X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.impl%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fimpl%2Fquery%2FQueryCache.java;h=35ebdbc65ba4ce82e5e7e7dced301310c30f8b17;hp=06882a48943e711e502d725108ee2f0e4147f213;hb=90a52d58489b6c518b13dde238923125c8f63eec;hpb=77ba75dcaf7d7c16187907f0661916d48e99edf6 diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCache.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCache.java index 06882a489..35ebdbc65 100644 --- a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCache.java +++ b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCache.java @@ -19,7 +19,7 @@ import org.simantics.db.request.Read; public class QueryCache extends QueryCacheBase { - private static final boolean SINGLE = false; + private static final boolean SINGLE = true; public QueryCache(QuerySupport querySupport, int threads) { super(querySupport, threads); @@ -68,12 +68,14 @@ public class QueryCache extends QueryCacheBase { } Objects entry = (Objects)cache.getOrCreateObjects(graph, r1,r2); IntProcedure procedure_ = procedure != null ? procedure : emptyProcedureObjects; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); Objects.computeForEach(graph, r1,r2, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -126,12 +128,14 @@ public class QueryCache extends QueryCacheBase { } Statements entry = (Statements)cache.getOrCreateStatements(graph, r1,r2); TripleIntProcedure procedure_ = procedure != null ? procedure : emptyProcedureStatements; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); Statements.computeForEach(graph, r1,r2, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -184,12 +188,14 @@ public class QueryCache extends QueryCacheBase { } DirectObjects entry = (DirectObjects)cache.getOrCreateDirectObjects(graph, r1,r2); IntProcedure procedure_ = procedure != null ? procedure : emptyProcedureDirectObjects; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); DirectObjects.computeForEach(graph, r1,r2, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -242,12 +248,14 @@ public class QueryCache extends QueryCacheBase { } RelationInfoQuery entry = (RelationInfoQuery)cache.getOrCreateRelationInfoQuery(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureRelationInfoQuery; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); RelationInfoQuery.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -300,12 +308,14 @@ public class QueryCache extends QueryCacheBase { } URIToResource entry = (URIToResource)cache.getOrCreateURIToResource(graph, id); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureURIToResource; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); URIToResource.computeForEach(graph, id, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -358,12 +368,14 @@ public class QueryCache extends QueryCacheBase { } ValueQuery entry = (ValueQuery)cache.getOrCreateValueQuery(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureValueQuery; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); ValueQuery.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -416,12 +428,14 @@ public class QueryCache extends QueryCacheBase { } OrderedSet entry = (OrderedSet)cache.getOrCreateOrderedSet(graph, r); IntProcedure procedure_ = procedure != null ? procedure : emptyProcedureOrderedSet; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); OrderedSet.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -474,12 +488,14 @@ public class QueryCache extends QueryCacheBase { } PrincipalTypes entry = (PrincipalTypes)cache.getOrCreatePrincipalTypes(graph, r); IntProcedure procedure_ = procedure != null ? procedure : emptyProcedurePrincipalTypes; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); PrincipalTypes.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -532,12 +548,14 @@ public class QueryCache extends QueryCacheBase { } DirectPredicates entry = (DirectPredicates)cache.getOrCreateDirectPredicates(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureDirectPredicates; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); DirectPredicates.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -590,12 +608,14 @@ public class QueryCache extends QueryCacheBase { } Predicates entry = (Predicates)cache.getOrCreatePredicates(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedurePredicates; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); Predicates.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -605,7 +625,7 @@ public class QueryCache extends QueryCacheBase { } } - ReadEntry getOrCreateReadEntry(ReadGraphImpl graph, Read r, boolean needsToBlock) throws DatabaseException { + private final ReadEntry getOrCreateReadEntry(ReadGraphImpl graph, Read r, boolean needsToBlock) throws DatabaseException { ReadEntry existing = null; synchronized(readEntryMap) { existing = (ReadEntry)readEntryMap.get(r); @@ -650,11 +670,13 @@ public class QueryCache extends QueryCacheBase { } ReadEntry entry = (ReadEntry)cache.getOrCreateReadEntry(graph, r, needsToBlock); if(entry == null) { - graph.processor.schedule(new SessionTask(graph) { + graph.asyncBarrier.inc(); + graph.processor.scheduleNow(new SessionTask() { @Override public void run0(int thread) { try { runnerReadEntry(graph, r, parent, listener, procedure, needsToBlock); + graph.asyncBarrier.dec(); } catch (DatabaseException e) { Logger.defaultLogError(e); } @@ -663,12 +685,17 @@ public class QueryCache extends QueryCacheBase { return null; } AsyncProcedure procedure_ = procedure != null ? procedure : emptyProcedureReadEntry; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) return entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + Object result = entry.performFromCache(graph, procedure_); + graph.processor.listening.registerFirstKnown(listener, result); + return result; + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); Object result = ReadEntry.computeForEach(graph, r, entry, procedure_, needsToBlock); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); + graph.processor.listening.registerFirstKnown(listener, result); return result; } } @@ -679,7 +706,7 @@ public class QueryCache extends QueryCacheBase { } } - AsyncReadEntry getOrCreateAsyncReadEntry(ReadGraphImpl graph, AsyncRead r, boolean needsToBlock) throws DatabaseException { + AsyncReadEntry getOrCreateAsyncReadEntry(ReadGraphImpl graph, AsyncRead r, CacheEntry parent, ListenerBase listener, final AsyncProcedure procedure, boolean needsToBlock) throws DatabaseException { AsyncReadEntry existing = null; synchronized(asyncReadEntryMap) { existing = (AsyncReadEntry)asyncReadEntryMap.get(r); @@ -696,11 +723,21 @@ public class QueryCache extends QueryCacheBase { } } if(existing.isPending()) { - if(needsToBlock) - waitPending(graph, existing); - else { - return null; - } + if(needsToBlock) + waitPending(graph, existing); + else { + existing.executeWhenResultIsAvailable(graph.processor, new SessionTask(graph) { + @Override + public void run0(int thread) { + try { + runnerAsyncReadEntry(graph, r, parent, listener, procedure, needsToBlock); + } catch (DatabaseException e) { + Logger.defaultLogError(e); + } + } + }); + return null; + } } return existing; } @@ -722,27 +759,23 @@ public class QueryCache extends QueryCacheBase { } return AsyncReadEntry.computeForEach(graph, r, null, procedure, needsToBlock); } - AsyncReadEntry entry = (AsyncReadEntry)cache.getOrCreateAsyncReadEntry(graph, r, needsToBlock); + AsyncReadEntry entry = (AsyncReadEntry)cache.getOrCreateAsyncReadEntry(graph, r, parent, listener, procedure, needsToBlock); if(entry == null) { - graph.processor.schedule(new SessionTask(graph) { - @Override - public void run0(int thread) { - try { - runnerAsyncReadEntry(graph, r, parent, listener, procedure, needsToBlock); - } catch (DatabaseException e) { - Logger.defaultLogError(e); - } - } - }); - return null; + // Entry was pending and this request has been queued + return null; } AsyncProcedure procedure_ = procedure != null ? procedure : emptyProcedureAsyncReadEntry; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) return entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + Object result = entry.performFromCache(graph, procedure_); + graph.processor.listening.registerFirstKnown(listener, result); + return result; + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); Object result = AsyncReadEntry.computeForEach(graph, r, entry, procedure_, needsToBlock); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); + graph.processor.listening.registerFirstKnown(listener, result); return result; } } @@ -796,12 +829,14 @@ public class QueryCache extends QueryCacheBase { } Types entry = (Types)cache.getOrCreateTypes(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureTypes; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); Types.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -854,12 +889,14 @@ public class QueryCache extends QueryCacheBase { } ChildMap entry = (ChildMap)cache.getOrCreateChildMap(graph, r); InternalProcedure> procedure_ = procedure != null ? procedure : emptyProcedureChildMap; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); ChildMap.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -912,12 +949,14 @@ public class QueryCache extends QueryCacheBase { } TypeHierarchy entry = (TypeHierarchy)cache.getOrCreateTypeHierarchy(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureTypeHierarchy; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); TypeHierarchy.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -970,12 +1009,14 @@ public class QueryCache extends QueryCacheBase { } SuperTypes entry = (SuperTypes)cache.getOrCreateSuperTypes(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureSuperTypes; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); SuperTypes.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1028,12 +1069,14 @@ public class QueryCache extends QueryCacheBase { } SuperRelations entry = (SuperRelations)cache.getOrCreateSuperRelations(graph, r); InternalProcedure procedure_ = procedure != null ? procedure : emptyProcedureSuperRelations; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); SuperRelations.computeForEach(graph, r, entry, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1075,12 +1118,14 @@ public class QueryCache extends QueryCacheBase { QueryCache cache = graph.processor.cache; AssertedPredicates entry = (AssertedPredicates)cache.getOrCreateAssertedPredicates(graph, r); IntProcedure procedure_ = procedure != null ? procedure : emptyProcedureAssertedPredicates; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); entry.compute(graph, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1122,12 +1167,14 @@ public class QueryCache extends QueryCacheBase { QueryCache cache = graph.processor.cache; AssertedStatements entry = (AssertedStatements)cache.getOrCreateAssertedStatements(graph, r1,r2); TripleIntProcedure procedure_ = procedure != null ? procedure : emptyProcedureAssertedStatements; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); entry.compute(graph, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1169,12 +1216,14 @@ public class QueryCache extends QueryCacheBase { QueryCache cache = graph.processor.cache; DirectSuperRelations entry = (DirectSuperRelations)cache.getOrCreateDirectSuperRelations(graph, r); IntProcedure procedure_ = procedure != null ? procedure : emptyProcedureDirectSuperRelations; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); entry.compute(graph, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1216,12 +1265,14 @@ public class QueryCache extends QueryCacheBase { QueryCache cache = graph.processor.cache; MultiReadEntry entry = (MultiReadEntry)cache.getOrCreateMultiReadEntry(graph, r); SyncMultiProcedure procedure_ = procedure != null ? procedure : emptyProcedureMultiReadEntry; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); entry.compute(graph, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1263,12 +1314,14 @@ public class QueryCache extends QueryCacheBase { QueryCache cache = graph.processor.cache; AsyncMultiReadEntry entry = (AsyncMultiReadEntry)cache.getOrCreateAsyncMultiReadEntry(graph, r); AsyncMultiProcedure procedure_ = procedure != null ? procedure : emptyProcedureAsyncMultiReadEntry; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); entry.compute(graph, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } } @@ -1310,12 +1363,14 @@ public class QueryCache extends QueryCacheBase { QueryCache cache = graph.processor.cache; ExternalReadEntry entry = (ExternalReadEntry)cache.getOrCreateExternalReadEntry(graph, r); AsyncProcedure procedure_ = procedure != null ? procedure : emptyProcedureExternalReadEntry; - ListenerEntry listenerEntry = cache.registerDependencies(graph, entry, parent, listener, procedure_, false); - if(entry.isReady()) entry.performFromCache(graph, procedure_); + if(entry.isReady()) { + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); + entry.performFromCache(graph, procedure_); + } else { assert(entry.isPending()); + graph.processor.listening.registerDependencies(graph, entry, parent, listener, procedure_, false); entry.compute(graph, procedure_); - if(listenerEntry != null) cache.primeListenerEntry(listenerEntry, entry.getResult()); } }