-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce the number of property lookups for matching entities #3119
Conversation
This commit adds a cache to the properties that have been discovered in each of the message payloads that an entity has a handler for. This prevents lookup of properties to occur for each instance of an event that is applied to an aggregate. With this optimization, a lookup is only required for each new payload type that is being applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the copyright notice not being changed in this pull request, I think this looks good. Hence, approving preemptively, assuming those will be adjusted.
@@ -0,0 +1,183 @@ | |||
package org.axonframework.modelling.command; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing the copyright notice in this new file.
@@ -22,7 +22,9 @@ | |||
|
|||
import java.lang.reflect.AnnotatedElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copyright notice should've been updated by these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concerns have been addressed, hence I'm approving this pull request.
This PR adds a cache to the properties that have been discovered in each of the message payloads that an entity has a handler for.
This prevents lookup of properties to occur for each instance of an event that is applied to an aggregate.
With this optimization, a lookup is only required for each new payload type that is being applied.