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

Hashing in IdentityMap is inefficient. #579

Closed
michael-simons opened this issue Jan 2, 2019 · 0 comments
Closed

Hashing in IdentityMap is inefficient. #579

michael-simons opened this issue Jan 2, 2019 · 0 comments
Assignees

Comments

@michael-simons
Copy link
Collaborator

Thanks to @Andy2003 it became clear in #577 that the hashing of node- and relationship entities has some room for improvement:

  • equals/hashCode of MappedRelationship should use standard JDK means
  • Arrays don't need to be converted into object arrays before being hashed
  • Don't create hashes based on toString methods of objects
  • IdentityMap#remembered can bail out early without accessing metadata in edge cases

Those improvements are mostly there but they should be tracked separately from #576.

@michael-simons michael-simons self-assigned this Jan 2, 2019
michael-simons added a commit that referenced this issue Jan 2, 2019
Co-authored-by: Michael Simons <michael.simons@neo4j.com>
michael-simons added a commit that referenced this issue Jan 2, 2019
This resolves #579.

Co-authored-by: Michael Simons <michael.simons@neo4j.com>
michael-simons added a commit that referenced this issue Jan 2, 2019
This resolves #579.

Co-authored-by: Michael Simons <michael.simons@neo4j.com>
michael-simons added a commit that referenced this issue Nov 15, 2019
The identity map used the wrong map to look up the expected hash value when both a node and relationship with the same id have been loaded and a NPE happened when casting literal Null to long. This has been fixed by first selecting the correct hash.

The error first appeared in the performance optimizations in #576, #577 and #579.
michael-simons added a commit that referenced this issue Nov 15, 2019
The identity map used the wrong map to look up the expected hash value when both a node and relationship with the same id have been loaded and a NPE happened when casting literal Null to long. This has been fixed by first selecting the correct hash.

The error first appeared in the performance optimizations in #576, #577 and #579.
michael-simons added a commit that referenced this issue Nov 15, 2019
The identity map used the wrong map to look up the expected hash value when both a node and relationship with the same id have been loaded and a NPE happened when casting literal Null to long. This has been fixed by first selecting the correct hash.

The error first appeared in the performance optimizations in #576, #577 and #579.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant