Identify Performance Issues
One indicator of a performance issue is when a script takes a long time to run but does not fail, resulting in web page latency. If you notice web page latency, a script is probably doing one or more of the following tasks:
- Performing a large number of record operations without going over the usage limit
- Triggering a large number of additional user event scripts/workflows to execute
- Performing a large number of database searches that take a long time to run
Each server-side script type or application has a time limit for execution. This limit is not fixed and depends on the script type or application. If a single execution of a script or application takes longer than the time limit for its type, an SSS_TIME_LIMIT_EXCEEDED error is thrown. This error can also be caused by a script that is executed by another script, for example, from a user event script that is executed by a scheduled script.
SuiteScripts That Can Affect Performance
The following types of scripts can potentially affect performance:
- User event SuiteScripts deployed against sales orders, customer records, or forms used by the Commerce website
- Workflows running against sales orders or customer records
- Customized sales order records that have custom fields
- Client SuiteScripts deployed against sales order records or forms used by the website (specifically cart and checkout performance when scriptable cart is enabled)
- SuiteBundles that contain any of the preceding types of scripts