-
Notifications
You must be signed in to change notification settings - Fork 165
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
ClassInfo#relationshipFields determines the field infos on each call #849
Comments
torstenkuhnhenne
added a commit
to torstenkuhnhenne/neo4j-ogm
that referenced
this issue
Oct 15, 2020
Cache the collection of FieldInfos for the relationshop fields as it is already done for the property fields.
torstenkuhnhenne
added a commit
to torstenkuhnhenne/neo4j-ogm
that referenced
this issue
Oct 15, 2020
Cache the collection of FieldInfos for the relationshop fields as it is already done for the property fields.
9 tasks
michael-simons
added a commit
that referenced
this issue
Oct 26, 2020
Cache the collection of FieldInfos for the relationship fields as it is already done for the property fields. Co-authored-by: Michael Simons <michael.simons@neo4j.com>
michael-simons
added a commit
that referenced
this issue
Oct 26, 2020
Cache the collection of FieldInfos for the relationship fields as it is already done for the property fields. Co-authored-by: Michael Simons <michael.simons@neo4j.com>
Fixed with #850 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When a relationship is mapped in OGM the method
ClassInfo#relationshipFields
is called every time. This is not necassary and theCollection<FieldInfo>
can be determined once and cached. This is already done for the property fields.The current implementation causes a not optimal performance:
With a cached implementation the method
ClassInfo#relationshipFields
tends to a zero execution time.I will try to create a Pull Request that uses as same logic for the relationship fields that is currently in use for the property fields.
Expected Behavior
Cache the field infos for relationship property as for the property fields.
Current Behavior
Field infos for the relationship properties are determined for each mapping.
Context
We are using relationship properties in some of our domain classes and reading those from the database is not as optimal as it could be.
Your Environment
Steps to Reproduce
Use domain classes with
@Relationship
annotations and do some performance tests reading entities from the database.The text was updated successfully, but these errors were encountered: