stevedlawrence commented on a change in pull request #207: Added support for 
enumerations and TypeValueCalc
URL: https://github.com/apache/incubator-daffodil/pull/207#discussion_r279825517
 
 

 ##########
 File path: 
daffodil-lib/src/main/scala/org/apache/daffodil/schema/annotation/props/PropertyScoping.scala
 ##########
 @@ -52,6 +52,11 @@ sealed abstract class PropertyLookupResult(val pname: 
String) extends Serializab
    * for the schema file.
    */
   def isFromDefaultFormat: Boolean
+  
+  lazy val toOption = this match{
 
 Review comment:
   But it looks like we only ever call toOption once for each property (addedin 
this commit). So I think we'd be storing something we never acess again, which 
will just waste memory. In this case, it's such a small amount I'm not sure it 
really matters, so I don't feel strongly about this.
   
   I kindof viewed this similar to something like Seq.headOption, which is 
going to allocatea new one everytime it's called. That might be bad, but what's 
the overhead of boxing vs using memory that can never be garbage collected?

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to