You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The version of apollo-compiler used by router has a perfomance issue in validation, which combined with large schemas and queries with a lot of fragment spreads can cause devastatingly slow parsing times (in seconds). I've opened an issue on apollo-compiler which contains more details about the problem.
Combined with the fact parsing is executed between await points and is blocking (for potentially seconds), this can cause the router's async runtime to completely fall apart and not being able to respond to any queries for minutes. I've opened a PR to run parsing through spawn_blocking instead of blocking a worker. This is especially concerning on schema reloads, where contention is high.
Both issues most likely need to be fixed to maintain good performance on schema reloads when it comes to parsing. Additionally, it might be worth thinking about how the implementers_map (apollo-compiler issue) can be cached through router reloads.
The text was updated successfully, but these errors were encountered:
xuorig
changed the title
Extremely slow parse times can cause the router to stop service requests
Extremely slow parse times can cause the router to stop serving requests
Jun 3, 2024
The version of
apollo-compiler
used byrouter
has a perfomance issue in validation, which combined with large schemas and queries with a lot of fragment spreads can cause devastatingly slow parsing times (in seconds). I've opened an issue on apollo-compiler which contains more details about the problem.Combined with the fact parsing is executed between
await
points and is blocking (for potentially seconds), this can cause the router's async runtime to completely fall apart and not being able to respond to any queries for minutes. I've opened a PR to run parsing throughspawn_blocking
instead of blocking a worker. This is especially concerning on schema reloads, where contention is high.Both issues most likely need to be fixed to maintain good performance on schema reloads when it comes to parsing. Additionally, it might be worth thinking about how the
implementers_map
(apollo-compiler issue) can be cached through router reloads.The text was updated successfully, but these errors were encountered: