-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
The average time take of executeQuery() test shows significant difference between version 19.11 and 21.0.
https://github.com/graphql-java/graphql-java/blob/v21.0/src/test/java/benchmark/BenchMark.java#L54
https://github.com/graphql-java/graphql-java/blob/v19.11/src/test/java/benchmark/BenchMark.java#L55
I've tested it by changing the NUMBER_OF_FRIENDS value to 10000, which is 10 times of the default setting in the benchmark test code.
Query used in the benchmark code
{
hero {
name
friends {
name
friends {
name
}
}
}
}
Object used in the benchmark code
{
"name": "r2d2",
"friends": [
{
"name": "friend1",
"friends":[],
},
{
"name": "friend2",
"friends":[],
},
...
// 10000 friends
]
}
Result by graphql-java versions
| version | result |
|---|---|
| 19.11 | 113.288ms |
| 20 | 111.996ms |
| 21.0 | 40.926ms |
| 21.2 | 41.718ms |
| 22 | 6.430ms |
Is it possible to apply the performance improvements that were done in 21.0 version to the 19.11 version?
I think the difference is not from java version (graphql-java 21.0 is using java 17) since the improvement is quite huge.
Thank you!
Metadata
Metadata
Assignees
Labels
No labels