Diagnostic view chart performance

When a report execution returns a large set of results, the browser might encounter a JavaScript timeout error when it tries to render the time-series chart. The browser might display a series of warning pop-up windows that indicate an unresponsive Script issue.

This situation occurs when a page takes longer to load than the browser expects. The expected error messages are:

Microsoft Internet Explorer

Stop running this script?
A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive.

Mozilla Firefox

Warning: Unresponsive script

A script on this page might be busy, or it might have stopped responding. You can stop the script now, or you can continue to see whether the script completes.

On encountering the error, the user is prompted to either stop the script or continue. If the user selects to continue, it is likely to make the browser to remain sluggish or non-responsive for a period until the script completes. If the user selects to stop, the script leaves the chart in an inconsistent state.

The presentation of this error message is a significant inconvenience to the user, but as it is due to the internal processing of the browser scripting engine. Therefore, it is necessary to find a balance between browser capability and the usability of the diagnostic view.

Performance tuning

The diagnostics view can render raw data or aggregated data, or a combination of both raw and aggregated data. When dealing with aggregated data only, a result set is generated that contains an optimal number of plot points that both Firefox and Internet Explorer can render successfully within a time-series chart.

The main concern then focuses on the ability of the diagnostic view to render raw data successfully.

The configuration of the report can significantly impact the size of the result set. The report settings that can contribute to the potential size of a result set are:

  • Time scope of the report – start-time and end-time.
  • Number of metrics in the report.
  • Granularity of the data being reported

Typically when querying raw data, the results set returned by the query to display as a time series chart is large. The granularity of raw data depends on the resource being monitored. Limiting either the time scope or the number of metrics in a report can significantly improve the charting performance with the browser. When you are dealing with raw data, narrow the time scope to the minimum period necessary, and select only essential metrics to locate the performance problem.

For all report scenarios, a set of results is rendered to a time-series charts as a set of plot points. The number of plot points to be rendered by a time-series chart for a resource is determined by the configuration of the report, by using the following formula:

((time-scope)/(granularity)) * (no. of metrics) = no. of plot points

The following table outlines the results of two reporting scenarios, the first shows five metrics that are reported over one day at granularity of 15 minutes, generating 480 plot points. The same number of plot points is generated by the second scenario, but in this case the user is reporting on a single metric, but over a period of five days.

Table 1. Results of two reporting scenarios
Time Scope No. of Metrics Granularity No. of Plot Points
1 day (24 hours) 5 15 minute ((24*60)/15)*5 = 480
5 days (1-24 hours) 1 15 minute ((5*24*60)/15)*1 = 480

After development testing to find and optimal balance between performance and usability of the diagnostics view here are the recommended number of plot points per chart that a browser can render without causing a scripting error is as follows:

Table 2. Recommended number of plot points per chart
Browser No. of plot Points
Firefox 1350
IE8 675
Note: Firefox rendering ability is superior by a factor of 2 to that of Internet Explorer.