You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Jira)" <ji...@apache.org> on 2023/04/10 15:46:00 UTC

[jira] [Created] (CAY-2805) Stop calling exp parser internally

Andrus Adamchik created CAY-2805:
------------------------------------

             Summary: Stop calling exp parser internally
                 Key: CAY-2805
                 URL: https://issues.apache.org/jira/browse/CAY-2805
             Project: Cayenne
          Issue Type: Improvement
    Affects Versions: 4.2.RC2
            Reporter: Andrus Adamchik
            Assignee: Nikita Timofeev


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.





--
This message was sent by Atlassian Jira
(v8.20.10#820010)