Pages

Wednesday, June 2, 2021

Salesforce Lightning Performance

Salesforce Lightning promises a lightning experience, however, some users experience a much slower performance in Lightning compare to Classic. Let's discuss how Lightning different from Classic and what we can do to improve the performance.

In Salesforce Classic, web pages are generated by the server, and then they’re rendered on the client (your user’s desktop or mobile device). In Lightning Experience, pages are loaded on your user’s device progressively, component by component.


1. IdeaExchange
Vote for this idea Lightning Experience LEX - lightning speed please! - as of now 55,490 points, feel free to vote that idea, but as performance is a long journey, let us dig further what we can do to increase the performance


2. Geographical
Yes, Salesforce is on the cloud, meaning you can access Salesforce from anywhere with an internet connection. However, your Salesforce org. still located in an instance with physical hardware in the data centers.

You may see instance APxx, EUxx, NAxx, which represents the data center's physical location that hosts your Salesforce org. (Asia Pacific, Europe, and North America). You should choose the instance that near to you. However, if your users are scattered around the world, select the instance where most of your users are located. When the user is located nearer to the Salesforce data center, latency will be lower and have better performance.

Using the speed test provided by salesforce, we can check the latency between our computer to salesforce org. that we are accessing. Make sure you already log in to Salesforce before running the speed test, you just need to add speedtest.jsp after salesforce.com/, here is the syntax https://[domain].my.salesforce.com/speedtest.jsp


The latency is 107 ms for my computer in Singapore to access the AP4 instance

The latency is 276 ms for my computer in Singapore to access the NA89 instance


From the above screenshots accessing the AP4 instance is much faster for me compare to the org located in NA89.

For the fastest and most stable experience, Salesforce recommends:
  • An Octane score of 30,000 or greater
  • Network latency of 150 ms or less
  • Download speed of 3 Mbps or greater
  • At least 8 GB of RAM, with 3 GB available for Salesforce browser tabs

Minimum requirements are:
  • An Octane score of 20,000 or greater
  • Network latency of 200 ms or less
  • Download speed of 1 Mbps or greater
  • At least 5 GB of RAM, with 2 GB available for Salesforce browser tabs

3. Hardware
In the above screenshots, at the top left, the speed test measures the Octane score. An Octane score is a benchmark that measures a JavaScript engine's performance by running a series of automated tests. The higher the Octane score, the better your Lightning Experience performance will be. Make sure your device has enough RAM. 


4. Web Browser
Lightning Experience supports most browsers, but you may find that it runs faster in some browsers than others. For instance, Lightning Experience runs faster in Google Chrome than Safari. 

You can check the best performance by browser from Lightning Usage App and select the Browser menu under Usage.



5. Experienced Page Time (EPT) 
Experienced Page Time (EPT) is a performance metric Salesforce uses in Lightning to measure page load time. EPT measures how long it takes for a page to load into a state that a user can meaningfully interact with.

To see the page load time/EPT counter from a page, you just need to add ?eptVisible=1 at the end of the URL, for example, https://domain.lightning.force.com/lightning/page/home?eptVisible=1


Each page will have a different EPT depending on the components added to the page. 


6. Lightning Component Debug Mode
Follow this document to enable debug mode for certain users. Salesforce is slower for any user who has debug mode enabled. Don’t leave debug mode on permanently. Users who have debug mode enabled see a banner notification once a week while it’s enabled.

Once the debug mode is enabled for you, you will also see the page load time (similar to eptVisible=1) and network bandwidth. You can click on the network bandwidth numbers to clear the storage, otherwise, it will be kept adding.



7. Lightning Page Analysis 
You can analyze lightning a page performance by editing the page and click Analyze button, you will get the predicted page load time (in seconds) and performance breakdown by component.



Reference

No comments:

Post a Comment

Page-level ad