mbeckerle commented on a change in pull request #316: Assortment of changes to
improve performance
URL: https://github.com/apache/incubator-daffodil/pull/316#discussion_r370624018
##########
File path:
daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/processors/unparsers/DelimiterUnparsers.scala
##########
@@ -56,7 +56,7 @@ class DelimiterTextUnparser(override val context:
TermRuntimeData, delimiterType
else localDelimNode.terminator
}
- if (delimDFAs.isEmpty) Assert.invariantFailed("Expected a delimiter of
type " + delimiterType + " on the stack, but was not found.")
+ if (delimDFAs.length == 0) Assert.invariantFailed("Expected a delimiter of
type " + delimiterType + " on the stack, but was not found.")
Review comment:
Deserves a note in our performance page on the wiki saying when to prefer
java arrays to sequences, and then ifyou are using java arrays, how to use them
so as to avoid the downsides of this particular flavor of auto-conversion.
----------------------------------------------------------------
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