How to obtain slow widget Debug timing in Service Portal


There may be one or many slow widgets on a ServiceNow Service Portal page (eg: /sp) but it is not obvious how you determine which widget is taking the time on the page. You would like to enable some debug timing information in order to determine which widget is slow, and therefore investigate further if its query can be optimized to improve its speed.



Enabling the debug console and obtaining the timing for a Service Portal widget:

  1. Load the Service Portal, http://<yourInstance>
  2. Observe the widgets loading on the page

    example Service Portal widgets
  3. Open up the debug console within the browser:
    • Firefox:  Tools > Web Developer > Browser Console > console (sub tab)
    • Chrome:  View > Developer > Developer Tools > console (sub tab)

      firefox web developer console
  4. While holding the Control key down, click on the header of each widget. The timing information is displayed at the top of the pop out menu Current Status generated in : 0.004
    • It is possible to do this for each widget on the Service Portal. To obtain more detailed information for the widget, complete the remaining steps.
      1. Select the last option Log to console: $scope

      2. The browser console populates with the widget object.

        example console output
      3. Within the Widget instance, expand the Object branch
      4. Look for the _server_time.  This is the timing information for that widget.

        observe the _server_time of the widget

      5. To erase all console information, click the Trash Can icon within the browser console, to click on another widget if required.
  5. Repeat the process as necessary for each widget and determine which are the slower widgets on that particular Service Portal page.


Article Information

Last Updated:2019-08-27 06:23:50