Andrus Adamchik created CAY-2705:
------------------------------------

             Summary: 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


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)

Reply via email to