Performance Testing

Performance testing of your Salesforce Org. Test end to end. This includes your back-end systems that need to be integrated downstream in your enterprise. Start from the UI, configure the Lightning console, check the performance of your pages, test the integration to the back-end systems, check the call-out time, and check the performance of your custom code. Some points to note:

  1. Bulk API is the solution for loading a large number of records into Salesforce. If you have 500,000 or more records to load, use Bulk API. Use SOAP for smaller datasets.
  2. Record locking errors are a common problem when coding data migrations with Salesforce. To lessen the chance of parent record lock contention among parallel load batches, presort the child records by parent ID. This way, all of the contacts that belong to the same account have a higher likelihood of being in the same batch and greatly reduces the lock potential.
  3. The optimal number of child records with a single parent account is 10,000.
  4. Synchronous tasks always have priority over asynchronous tasks. Using asynchronous operations should be used when there’s not a need for immediate processing.
  5. To improve performance when using SOSL, avoid wildcards and make sure that the search terms are very specific.
  6. Utilize filters and scope more efficiently so that less data is queried when running reports and the data can be returned faster. A good practice is to use relative date values in reports, for example this week, next week or next month. Prevent using not contains and not equal to with indexed fields. Avoid using formula fields in report filters. Equals is better than contains because contains does a wildcard search.

Check out:

  1. Strategies for Performance Testing Custom Salesforce Deployments
  2. Introduction to Performance Testing
  3. Org Performance at Scale – Trailhead