Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-1877

Slow schema compilation due to unambiguous checks

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: Front End, Performance
    • Labels:
      None

      Description

      Commit 02c8324294ed4395c1231c6ea3ec6ae77139ba46 caused ATO schema compilation time to jump from about 10 seconds to over 2 minutes. Large increases were also seen in VMF schema compilation.

      Some debugging showed that the cause is likely in the DFDLPathExpressionCompiler. Wrapping the following code the compiles an individual expression in a Timer shows an average of 9000% increase in time to compile.

      ```scala

      val compiler = new DFDLPathExpressionParser[T](qn,
      nodeInfoKind, namespaces, compileInfoWherePropertyWasLocated, isEvaluatedAbove)
      val compiledDPath = compiler.compile(expr)
      compiledDPath

      ```

      So this most likely has something to do with schema compilation. Nothing jumps out at me in the specified commit as being especially egregious to cause such a performance degredation. All the really changed was passing an extra parameter for error accumulation and changing how isReferencedByExpressions is set. I wouldn't expect that to cause such performance changes. Perhaps it is findNamedMatches now allocating a Seq?

        Attachments

          Activity

            People

            • Assignee:
              dfthompson Dave Thompson
              Reporter:
              slawrence Steve Lawrence
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: