Background: I have created a lightning quick action button, when i click the button, the apex controller makes a GET Http callout to a 3rd party web service.

The web service returns a JSON, and within the JSON are two objects. I then deserialize the JSON, and apply logic that calculates totals and returns two maps, one for each object. The method in apex controller that has the logic is called from the lightning component controller. In the lightning controller helper I prepare the data to be displayed as charts. Charts.js is stored as a static resource in salesforce.

From the time I make a request to the time the charts are displayed on the popup screen it takes about 8 seconds and for some records it takes almost 22 seconds. I am trying to find out why the charts are not displayed instantaneously?

Question: Apart from debug logs in my code, and checking from postman, how can i find out where the time leak is happening?

Is there a web service performance analyzer that can tell me

  1. How long it took to authenticate the request ?
  2. How long it took for the webservice to get data from the database, and send the request. ?

1 Answer 1


For making http callout from Salesforce it won't consume more time. But based on network speed, response data size(varies based on record data), chart js libraries displaying charts it takes time. If you are using for loops and if else conditions more in apex class then it will take more time. Use switch statements instead of if else statements in apex to process response data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .