Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1785

SimpleTypeRuntimeData facet evaluation causes slow compile time


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • deferred
    • None
    • Back End, Middle "End"
    • None

      The code in Facets.scala and RestrictionUnion.scala appears to cause a notcable hit in performance (maybe 20% on a very large file with lots of restrictions). If I replace all the facet information in in the SimpleTypeRuntimeData constructor with Nil's and None's, compile time decreases. I suspect there are some performance improvements we can make with Facets.scal and ResttrictoinUntion. A quick cursory sees some duplicating effort (e.g. multiple calls to xml
      "restriction", which is probably pretty slow itself. Facets.scala is kindof messy and hard to read, so a redisgn/refactoring might make it easier to improve this aspect of compilation.

      Also, removing the requiredEvaluations in Facets.scala also helps quite a bit. Seems perhaps the pattern one might be the worse offender.

              Unassigned Unassigned
              slawrence Steve Lawrence
              0 Vote for this issue
              1 Start watching this issue