-
Notifications
You must be signed in to change notification settings - Fork 280
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
Slow response times with large documents #144
Comments
hi! Just to check something: do you do a few queries to the router first, or launch the benchmark directly on it? It includes a caching step for the query planning, and that step can take a while, but afterwards queries are much faster. |
The difference between the first query and subsequent queries is like 46 seconds vs 45 seconds. And that's while underlying subgraph takes only 3 seconds. Again the problem here is that both gateway and router overhead scales exponentially with response size. |
I see. Another thing to check, this is with the router from the release package, not built from source? I'll look into those perf issues |
Yes, this is what I used for testing:
|
Alright. What's the shape of the data? A few very large fields, lots of different fields, a deeply nested structure ? |
I'm pretty sure it'll repo on any big collection. Here is a good investigation graphql/graphql-js#723 (comment) on this. |
looks like it's spending most of the time on deserialization (tested on main at d9b3c43) |
@Mithras I'm closing this now, let me know if the problem appears again |
Describe the bug



Performance on large responses is even worse than with gateway. This makes federation unusable if you need to query large amounts of data.
E.g.
router (it doesn't gzip but it's all running on localhost so size is not the reason it's 10 times slower):
gateway:
direct:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Router overhead at least shouldn't be worse than gateway.
Desktop (please complete the following information):
Additional context
See graphql/graphql-js#723
It would be amazing to have an option to disable whatever "guarantees" gateway/router is "responsible" for. I can guarantee everything I need at a subgraph level, I don't need gateway/router to double guarantee it at a 10x cost.
The text was updated successfully, but these errors were encountered: