mbeckerle commented on code in PR #1396:
URL: https://github.com/apache/daffodil/pull/1396#discussion_r1894178523
##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/oolag/OOLAG.scala:
##########
@@ -687,22 +697,26 @@ object OOLAG {
final lazy val valueAsAny: Any = {
if (hasValue) value_.get
- val res =
- try {
- oolagBefore
- val v = body // good place for a breakpoint
- oolagAfterValue(v.asInstanceOf[AnyRef])
- v
- } catch {
- case npe: NullPointerException => throw npe
- case s: scala.util.control.ControlThrowable => throw s
- case u: UnsuppressableException => throw u
- case e: Error => throw e
- case th: Throwable => oolagCatch(th)
- } finally {
- oolagFinalize
- }
- res
+ else {
Review Comment:
This is the other significant functional improvement.
The improvement here was minor at best. Not measurable really. Still it is
more correct now.
##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/util/Timer.scala:
##########
@@ -30,6 +30,7 @@ object Timer {
case "ms" => nanos / 1000000
case "ns" => nanos
}
+ System.err.println(s"[info] Time${msg}: ${time}${units}")
Review Comment:
Revert changes in this file.
##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/DFDLSchemaFile.scala:
##########
@@ -206,23 +207,9 @@ final class DFDLSchemaFile(
private lazy val loader = new DaffodilXMLLoader(errHandler)
lazy val iiXMLSchemaDocument = LV('iiXMLSchemaDocument) {
- val res = makeXMLSchemaDocument(seenBefore, Some(this))
- if (res.isDFDLSchema && sset.shouldValidateDFDLSchemas) {
- //
- // We validate DFDL schemas, only if validation is requested.
- // Some things, tests generally, want to turn this validation off.
- //
- try {
- loader.validateAsDFDLSchema(schemaSource)
Review Comment:
This is the big improvement. There is no need to validate each schema file
as a DFDL schema, only the root file. This was being called 995 times for
Link16.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]