Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2107

RDF Star performance issue with non-concrete node triples

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • Jena 3.17.0, Jena 4.0.0
    • Jena 4.1.0
    • ARQ
    • 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.

      Attachments

        Activity

          People

            andy Andy Seaborne
            LorenzB Lorenz Bühmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: