Optimize ReadGraph.hasStatements(s,p) to not use getObjects(s,p)
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 10 Jun 2020 18:41:27 +0000 (21:41 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 17 Jun 2020 20:56:54 +0000 (23:56 +0300)
commit638ce7e010a6292fedc677de18173676db305881
tree3a0ceb945740bfa384d21058045fbcc784d0e0a9
parentff5dddc885c9b3e6e973cfa3eebe9c3d1013c304
Optimize ReadGraph.hasStatements(s,p) to not use getObjects(s,p)

Depending on the predicate asked for, hasStatements(s,p) can be
optimized to not realize the entire [object] result list created by
getObjects(s,p).

gitlab #558

Change-Id: I7be1d2000396ce6c1e4595cabaafef5db4224de9
(cherry picked from commit ac990d10ff2d1d1042a68f0594489aed23a27453)
bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/ReadGraphImpl.java