Open JIshanRandika opened 7 months ago
Hi,
There are a couple of concerns here.
So, as a quick fix, we can reduce the time by reducing the amount of data returned from this API. We (the Ballerina Library Team) can help you to implement the pagination as well if required.
The performance issue is related (but not limited) to https://github.com/wso2-enterprise/internal-support-ballerina/issues/626 as well.
I will update here when we have more information about this and the possible fixes.
service.bal
for REST service:service.bal
for GraphQL service:Both of the above services calling the same function. Retrieving the 10 records through the REST API results in a response time of 941ms, whereas GraphQL takes 3.4s (same size - 24.06KB). This discrepancy in response time persists and worsens with an increase in the number of records queried via GraphQL.
Note: No delay to retrieve data from the database. Delay becomes when pushing the data to somewhere (such as UI or Postman) after retrieved the data from database.