We don’t like waiting. We’ve got used to deliveries being at our door on the same or next day, easy and fast contactless payments, powerful phones and computers that barely struggle with our daily tasks, and instant replies to our messages. And when it comes to online browsing, we still have a need for speed.
Studies have shown that, if a website takes 3 seconds to load, we are 32% more prone to leave the website than if it takes 1 second. And the longer a page takes to load, the higher the probability that we’ll just look for what we want somewhere else instead.
As a result, it is increasingly more difficult not to bring these same expectations we have as consumers to our workplace, especially when using business apps and tools.
Some of us may have resigned ourselves to using slow and clunky business apps, but it doesn’t have to be so. By combining the latest Salesforce tools with Provar, we can make sure that end-users have a positive experience when using Salesforce as part of their work.
Salesforce Performance Analysis for App Builder
With the Winter ’21 release, Salesforce introduced Performance Analysis for App Builder which helps admins and developers understand how much each page component contributes to the overall load time. In addition, Performance Analyzer also shows useful tips to improve their overall performance, specifically with the aim of improving the page performance.
According to Salesforce, these are some design-related issues that can cause a page to load slowly including
- Too many components visible on page load
- Too many heavy-impact related lists visible, especially those with multiple-object relationships
- Too many fields in your Record Detail component
- Having the News or Twitter component visible
The main recommendation to improve page performance is to reduce the number of components shown on the page on load. This can easily be done by moving components to non-default tabs or accordion sections or by reducing the number of record fields shown.
However, it is important to consider if by hiding information users will spend more time clicking around to find what they need, and, therefore improving page performance to the detriment of the overall user experience. In this article, we will review some exercises to help improve your UI tests performance with Performance Analysis and Provar.
Exercise 1: Improving the performance of the Account Lightning page
In order to try Performance Analysis for App Builder, I’ve chosen to edit the Account record page, which must be one of the most used across Salesforce, along with the Contact and Opportunity ones.
By default, the Account Lightning page seems to load a moderate amount of components, which results in a predicted page load time of 2.7 seconds (as depicted in the screenshot of the original page and its performance metrics below).
The purpose of this exercise is to reduce the page load time. I put into practice some of the recommendations and performed the following changes:
- Move the Activity and Chatter tabs to the main tab list that already has Related, Details, and News.
- Change the default tab to Details, which loads faster than the Related tab.
- Change page layout to Header and One Region because we don’t need the sidebar now.
- Remove the extra information on the Highlights component.
After making these modifications, the page load time decreased by half a second (almost 20%), from 2.7 to 2.2 seconds, and the final result looked like this:
Exercise 2: Measuring the performance improvement on the related UI tests
How much would an improvement of 0.5 seconds impact those UI tests that make use of the Account Lightning page? After running a battery of Provar test cases that only loaded the Account page before and after the improvements, I was able to measure an improvement of up to 6.5 seconds with an average of 3 seconds on the total test runtime.
The effect of this small improvement should be multiplied by the number of times the Account page would be rendered in our tests, and by the number of times those tests would run over time. These seemingly small changes could result in minutes of computing time saved as a result of such a small page load time decreasing on only one page.
Improving page performance is a fast and relatively easy way of enhancing user experience and increasing productivity, and thanks to Performance Analysis for App Builder, Salesforce admins and developers can measure the impact their changes have on page loading times.
As a side result of page performance improvements, UI tests that load those pages will also run faster. And because of automated UI testing with tools like Provar, those small gains get compounded the more often those tests are run.
Provar lets your team focus on delivery. With full support for Salesforce clouds and technologies, you can rest assured we’ll have your needs covered now and in the future. Learn more about our advanced key applications here.