-
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
Performance issues on graph to entity mapping #403
Comments
Hi, thank you for reporting this. Could you retest this with SDN 5 RC3 and latest OGM 3.0.0-SNAPSHOT? Would it be possible for you to share a reproducible use case? Or at least share the domain classe(es) and the query? |
Hi Frant. I can confirm the same behavior on SDN 5 RC3 and OGM 3 SNAPSHOT. I will provide some classes for a reproducible use case. |
Hi Frant. Please use this repository as a reproducible use case. |
Fixes #403, performance issue when mapping large number of rows returned.
Fixes #403, performance issue when mapping large number of rows returned.
Fixes #403, performance issue when mapping large number of rows returned.
Hi there!
I'm experiencing some performance issues when I'm mapping a query to a Java entity list.
My query results 17k nodes containing 11 properties each one.
Expected Behavior
I know that we pay an overhead for dynamic mapping entities when use meta programming (eg. reflection), but the current implementation of
GraphEntityMapper.java
is too much expensive.The GraphEntityMapper.java seems to spend a lot of CPU on
Metadata.classinfo()
.Current Behavior
1.3s -> When I map the result to a
@QueryResult
class (SingleUseEntityMapper)18s -> When I map the result to a
List<Entity>
(GraphEntityMapper)Possible Solution
I think that GraphEntityMapper could cache some metadata if the mapping process groups the nodes by its labels. The mapping could run on "Labels batches".
My current workaround is to use
@QueryResult
classes.Your Environment (updated)
Java 8
Spring Boot 2.0.0.M3
Neo4j 3.2.3
Spring Data Neo4J 5.0.0.RC3
Linux Ubuntu
Neo4J-OGM 3.0.0-SNAPSHOT (2017-09-14)
Thanks in advance.
The text was updated successfully, but these errors were encountered: