You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Lorenz Bühmann (Jira)" <ji...@apache.org> on 2021/05/17 13:36:00 UTC

[jira] [Created] (JENA-2107) RDF Star performance issue with non-concrete node triples

Lorenz Bühmann created JENA-2107:
------------------------------------

             Summary: RDF Star performance issue with non-concrete node triples
                 Key: JENA-2107
                 URL: https://issues.apache.org/jira/browse/JENA-2107
             Project: Apache Jena
          Issue Type: Improvement
          Components: ARQ
    Affects Versions: Jena 4.0.0, Jena 3.17.0
            Reporter: Lorenz Bühmann
             Fix For: Jena 4.1.0


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:
{code:java}
?s <p> ?o .  
<< ?s <p> ?o >> <p2> ?v .
{code}
A possible fix would be to adapt the method `rdfStarTripleSub` in class
[SolverRX3.java|https://github.com/apache/jena/blob/2efff8a00b4ffa82751cf46c8a3fed84b6ff3090/jena-arq/src/main/java/org/apache/jena/sparql/engine/main/solver/SolverRX3.java#L63-L71]
by changing the beginning to
{code:java}
private static Iterator<Binding> rdfStarTripleSub(Binding input, Triple xPattern, ExecutionContext execCxt) {
        Triple tPattern = Substitute.substitute(xPattern, input);
{code}

We went from 75s for a very small dataset (50k triples) to near instant response times.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)