Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2805

Stop calling exp parser internally

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.2.RC2
    • 4.2, 5.0-M1
    • None
    • None

    Description

      This is a performance optimization suggestion. Just noticed during profiling a few minor "hotspots" due to calling "ExpressionFactory.exp()" inside the following methods in the Cayenne core:

      • PrefetchProcessorJointNode.buildRowMapping(..)
      • DefaultSelectTranslator.appendQueryColumns(..)
      • SelectQueryMetadata.buildEntityResultForColumn(..)

      This results in exp parser invocation, which is fairly slow. At the same time, in all these places the expression is known to be a path (either DB or OBJ). So we can take a shortcut and apply a faster parsing function to generate ASTObjPath or ASTDbPath.

      Attachments

        Activity

          People

            ntimofeev Nikita Timofeev
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: