Details
-
Improvement
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
Jena 3.17.0, Jena 4.0.0
-
None
Description
the following graph pattern is not evaluated efficiently (results in full-scan per binding) because the second triple pattern doesn't take advantage of the bindings generated by evaluation of the first one:
?s <p> ?o . << ?s <p> ?o >> <p2> ?v .
A possible fix would be to adapt the method rdfStarTripleSub() in class
SolverRX3.java
by changing the beginning to
private static Iterator<Binding> rdfStarTripleSub(Binding input, Triple xPattern, ExecutionContext execCxt) { Triple tPattern = Substitute.substitute(xPattern, input);
We went from 75s for a very small dataset (50k triples) to near instant response times.
If this fix is correct and doesn't break anything, it might be the same way to fix for its quads counterpart in SolverRX4 class.
Note, for tdbquery, this seems to be evaluated at a different place? At least, we couldn't find any performance improvement, it's still horribly slow.