Skip to content
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

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

abuijze
Copy link
Member

@abuijze abuijze commented Aug 29, 2024

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.

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.
@abuijze abuijze self-assigned this Aug 29, 2024
@abuijze abuijze added Type: Enhancement Use to signal an issue enhances an already existing feature of the project. Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. labels Aug 29, 2024
@smcvb smcvb added this to the Release 4.10.1 milestone Aug 29, 2024
Copy link
Member

@smcvb smcvb left a 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;
Copy link
Member

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;
Copy link
Member

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.

Copy link
Member

@smcvb smcvb left a 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.

@smcvb smcvb merged commit 6a0de23 into axon-4.10.x Aug 29, 2024
5 of 7 checks passed
@smcvb smcvb deleted the fix-excessive-property-lookup branch August 29, 2024 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 2: Should High priority. Ideally, these issues are part of the release they’re assigned to. Type: Enhancement Use to signal an issue enhances an already existing feature of the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants