You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by GitBox <gi...@apache.org> on 2019/11/30 18:50:04 UTC

[GitHub] [jena] afs commented on issue #640: JENA-1787: Improve performance of ValidationProc.simpleValidatationNode

afs commented on issue #640: JENA-1787: Improve performance of ValidationProc.simpleValidatationNode
URL: https://github.com/apache/jena/pull/640#issuecomment-560010972
 
 
   Good improvement.
   
   I think it is better to put the new logic in `simpleValidatationInternal`, the top of the evaluation process, as being a slightly more robust. The new logic isn't bypassed, especially the assumption that only true focus nodes get passed into the processing.
   
   Code below (+ align calls to the function); it does incorporate the `isFocusNode` and singleton path without getting all focus nodes.
   
   If this is OK, I can the changes after merging this PR; no requirement to update the PR itself.
   
   ```
       /**
        * Validation process.
        * Either all focusNode for the shape (argument node == null)
        * or just for one node of the focusNodes of the shape.
        */
       private static void simpleValidatationInternal(ValidationContext vCxt, Graph data, Node node, Shape shape) {
           Collection<Node> focusNodes;
      
           if ( node != null ) {
               if (! isFocusNode(shape, node, data))
                   return ;
               focusNodes = Collections.singleton(node);
           } else {
               focusNodes = getFocusNodes(data, shape);
           }
           . . . 
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services