-
-
Notifications
You must be signed in to change notification settings - Fork 570
Description
Hello,
It seems I have some performance problems on large datasets with the library.
My request is:
{
families(codes: [
... 100 family codes
]) {
code,
attributes {
code
}
}
}
Inside each families, I have 100 attributes.
It takes more than 1 seconds to respond. It seems that GraphQL implementation call resolveField for each field, and that's it's pretty slow.
And when I want to display all properties in a family, it takes more than 6 seconds.
In this case, the rest API only takes 2 seconds.
Theoretically, rest API should be slower because with GraphQL, I use the dataloader, reducing drastically the number of requests to the database.
I tried to figure out the performance of the library by using your phpbench tests, but resolving 10000 fields takes only 200 ms with the generated schema.
So, I'm wondering if I did something badly or if GraphQL is pretty slow on large datasets.
I saw that this problem is common on different languages (graphql/graphql-js#723).
I can provide blackfire profile if you want.
Thanks for any advice.