Summary
Certain pages on Service Portal load very slowly, either when navigating to them or accessing them directly. This is commonly because one or a few widgets are taking most of the time to load. This article describes how to identify these scenarios.
Release
Applicable to all releases
Instructions
1. Determine which page is loading slowly. You can find this by following the Steps to Reproduce the issue, otherwise, load the page and look for the value present in the URL for id param (for example /sp?id=list)
2. Once identified, find out how much time it is taking for the page to load. You can check this on the browser dev tool's Network tab. This will tell how much time is taken on what aspect.
In the following screenshot from a use case, notice the total time taken is 5.43 seconds, which is mostly waiting time of around 4 seconds.
If the waiting time is taking the most of the time, this means that the response from the server takes longer.
3. Once it is determined that server time is taking more time, see which server functionality is responsible. There could three scenarios:
- Slow running ACL
- Slow running business rules
- Slow running SQL queries.
4. To find out which of these are consuming the most time, go to System Diagnostics > Session Debug > Debug Log.
5. After enabling the debug log, reproduce the issue and try to get the logs on the jsdebugger window or on a ui_page.do. If this transaction has taken more time, a log similar to the following will appear. The key word is EXCESSIVE.
log05:15:20 AM.771 EXCESSIVE *** End #2298398 /api/now/sp/page, user: admin, total time: 0:00:06.484, processing time: 0:00:06.484, SQL time: 0:00:05.209 (count: 887), business rule: 0:00:00.001 (count: 6), ACL time: 0:00:00.001, Cache build time: 0:00:00.007, source: 103.23.66.61 , type:rest, method:GET, api_name:now/sp, resource:now/sp/page, version:Default, user_id:admin, response_status:200