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

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

     [ https://issues.apache.org/jira/browse/CAY-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nikita Timofeev closed CAY-2805.
--------------------------------
    Resolution: Fixed

*5.0*: https://github.com/apache/cayenne/commit/e77da423b4894cb65d5d5cb2114ae92e9644dbdf
*4.2*: https://github.com/apache/cayenne/commit/5c43442140ffbe2d6d2c7dad54f52a868609968e

> 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
>            Priority: Minor
>
> 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)