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
We have conducted a load test on the GraphQL module, and it shows that even though the CPU usage is high, the throughput is low. After profiling, we identified the areas that take most of the time while processing requests. To improve performance, we are planning to try out the following changes in GraphQL module:
Reduce the usage of cloneReadOnly() in the parser.
Minimize lock usage.
Use the readonly type wherever possible.
Reduce the usage of Ballerina's is checks in the parser.
Replace string:Char usages with string.
Refactor the Node modifier context.
Refactor Response formatter.
Version
update 9, 10, 11
The text was updated successfully, but these errors were encountered:
DimuthuMadushan
changed the title
Refactor GraphQL Module to Reduce Usages of cloneReadOnly(), clone() Functions
Refactor the GraphQL Module to Improve the Performance
Mar 7, 2025
I attempted tasks 1 and 6, but they did not show any improvement compared to the above changes. Currently, I am working on refactoring the response formatter.
@ThisaruGuruge has completed tasks 2, 3, 4, and 5, which have increased performance by 3X and significantly reduced latency. Refer to the performance comparison for more details.
Description
We have conducted a load test on the GraphQL module, and it shows that even though the CPU usage is high, the throughput is low. After profiling, we identified the areas that take most of the time while processing requests. To improve performance, we are planning to try out the following changes in GraphQL module:
cloneReadOnly()
in the parser.readonly
type wherever possible.is
checks in the parser.string:Char
usages withstring
.Version
update 9, 10, 11
The text was updated successfully, but these errors were encountered: