mbeckerle commented on a change in pull request #431:
URL: https://github.com/apache/incubator-daffodil/pull/431#discussion_r512181997



##########
File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/RuntimeData.scala
##########
@@ -672,7 +672,7 @@ sealed class ElementRuntimeData(
 
   def isSimpleType = optPrimType.isDefined
 
-  def schemaURIStringsForFullValidation = 
schemaURIStringsForFullValidation1.distinct
+  lazy val schemaURIStringsForFullValidation = 
schemaURIStringsForFullValidation1.distinct
   private def schemaURIStringsForFullValidation1: Seq[String] = 
(schemaFileLocation.uriString +:
     childERDs.flatMap { _.schemaURIStringsForFullValidation1 })

Review comment:
       Interesting algorithmic point about all this lazy val stuff we do.
   
   If you change this recursion to call schemaURIStringsForFullValidation 
(without the "1" suffix), this algorithm will be greatly improved because we 
expect tons of duplicates - so squeezing them out with the "distinct" 
recursively, as we aggregate up the tree, that call should pay dividends. 




----------------------------------------------------------------
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:
[email protected]


Reply via email to