Performance issues in graphql-java, specifically in ExecutionStrategy#completeField() and ExecutionStrategy#fetchField()

Viewed 359

While testing our application for bulk data, in the JProfiler readings we see graphql parsing and processing is taking significantly more time than the DB layer.

1- For 1k records

  • total graphql execution is taking ~6.6s
  • wherein DB lookup/Datafetcher is taking ~961ms

2- For 65k records

  • total graphql execution is taking ~228s
  • wherein DB lookup/Datafetcher is taking ~21s

Specifically these two methods of Graphql are taking most of the processing time:

  • graphql.execution.ExecutionStrategy#completeField
  • graphql.execution.ExecutionStrategy#fetchField

For complete issue see : https://github.com/graphql-java/graphql-java/issues/2017

Ask is : What factors contribute to graphql processing overhead? Are there any best practices that can help in reducing the overall time as we are extensively using graphql in all our APIs?

0 Answers
Related