GraphQL performance issues on larger sites #8982
Unanswered
valschr
asked this question in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are seeing severe performance issues when building larger headless sites using GraphQL. Sites with approx 1000 pages can take up to an hour to statically build, and even smaller sites with 150-200 pages take 20 minutes to export, creating issues for our clients on deployments. Also dynamic client site queries (eg for blog filters) can take +10 sec to compute, making it unusable for server side filtering or lazy loading (AWS instance is medium / large)
After searching for similar issues on google and using xdebug to investigate performance bottlenecks it seems that most of it is caused by dynamic schema building in the rebing/graphql-laravel library. Related to this I found this post and this attempt to fix it
Most of our sites use a dynamic page builder, resulting in many types, unions and generally a complex graphql schema, but I could not find a way to cache the schema or drastically improve the performance.
Currently it is preventing us from building new headless sites on Statamic, given the scaleability and performance issues with GraphQl.
Has anyone facing these issues before? Maybe we are overlooking something simple.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions