-
Notifications
You must be signed in to change notification settings - Fork 18
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
efficiency: investigate bottleneck #547
Comments
Early investigations using #546:
|
* The resolve routine is implmented recursively in the graphql-ws library. * Because the function is async this results in a large number of async tasks being created when the library is used with large, deeply nested schema. * Async tasks have an overhead, above that of regular function calls. * For the example in cylc#547 this resulted in over 10 seconds of overheads.
* Partially addresses cylc#547 * The resolve routine is implmented recursively in the graphql-ws library. * Because the function is async this results in a large number of async tasks being created when the library is used with large, deeply nested schema. * Async tasks have an overhead, above that of regular function calls. * For the example in cylc#547 this resulted in over 10 seconds of overheads.
* Partially addresses cylc#547 * The resolve routine is implmented recursively in the graphql-ws library. * Because the function is async this results in a large number of async tasks being created when the library is used with large, deeply nested schema. * Async tasks have an overhead, above that of regular function calls. * For the example in cylc#547 this resulted in over 10 seconds of overheads.
graphql-ws: optimise the "resolve" routine * Partially addresses #547 * The resolve routine is implmented recursively in the graphql-ws library. * Because the function is async this results in a large number of async tasks being created when the library is used with large, deeply nested schema. * Async tasks have an overhead, above that of regular function calls. * For the example in #547 this resulted in over 10 seconds of overheads. * websockets: avoid duplicate resolve call Due to inheritance, we were calling `resolve(execution_result.data)` twice. --------- Co-authored-by: Tim Pillinger <[email protected]>
The |
The other thing we do is recursively sift through the GraphQL query result (in the middleware) and strip out all the null fields... Not exactly sure how expensive this is.. Think I use the promise library for this. |
Sorry if I've missed relevant discussions elsewhere (just back from leave) - but can we just rename all affected variables using JS conventions? It'll look ugly in a Python program, but the payoff sounds big. |
We could, but it would be easier to just cache the output of the method or re-write the code so that method doesn't get hammered, there's a separate issue for this in cylc-flow. |
This workflow has proven to be remarkably difficult for the UIS & UI to handle:
For more information see: https://cylc.discourse.group/t/slow-load-of-cylc-workflows-disconnects/823/19
Investigation so far has confirmed:
This issue focuses on the UIS side of things.
Suggested remediation (Flow/UIS only, please update with new suggestions):
The text was updated successfully, but these errors were encountered: