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 2021/03/23 06:44:00 UTC

[jira] [Updated] (CAY-2705) Performance of callback annotation processing

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

Andrus Adamchik updated CAY-2705:
---------------------------------
    Fix Version/s: 4.2.B1

> Performance of callback annotation processing
> ---------------------------------------------
>
>                 Key: CAY-2705
>                 URL: https://issues.apache.org/jira/browse/CAY-2705
>             Project: Cayenne
>          Issue Type: Task
>            Reporter: Andrus Adamchik
>            Assignee: Nikita Timofeev
>            Priority: Major
>             Fix For: 4.2.B1
>
>
> Per CAY-2692 we added support for annotated callbacks on entities. This is a great feature that was requested repeatedly. 
> But it looks we ignored the performance aspect of it (which was the reason we didn't include it in Cayenne before. See comments in CAY-1559 for instance). I see a couple of problems:
> * (minor refactoring needed) Class.getDeclaredMethods is called first in EntityResolver.initCallbacks() and the in inner loop inside CallbackOnEntity, even though we already know the method).
> * (major concern) Eagerly scanning the entire mapped class hierarchy was very slow in the past. One of Cayenne advantages is fast startup. This may have a major impact on this. So let's profile a sufficiently large model with "wide" classes with lots of properties and see how bad it is.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)