Optimization

To reduce communication between client and database, Application Studio attempts to cluster report formulas. Instead of each formula causing a request to the database, the clustered formulas are handled by a single database request. However, there are certain practices that destroy clustering and so degrade performance. If reports perform slowly you should investigate whether these practices have been used.

Cases that destroy clustering:

  • Use of a function (for example ROA, ROC etc.) as a parameter of another function.
  • Use of a function within an IF statement.
  • Use of a function in a conditional cell format. Conditional formula calculations are not clustered in Application Studio.

In each of these cases a solution is to put the function in a cell in a hidden row or column of the report and to refer to it in the function, statement or cell format.

Other cases that affect clustering are:

  • Use of invalid coordinates in an ROC or CELLGET function.

This can occur, for example, if a variable contains an element from the wrong dimension or if a dimension contains an empty string. Application Studio breaks each cluster into ever smaller segments in an attempt to identify the invalid coordinates. This can significantly reduce performance.

  • Setting a global variable in the OnScriptStart event.

In some circumstances, setting a global variable in the OnScriptStart event can cause the event to be triggered recursively. This can happen, for example, if the variable or one of its dependent objects is used in a ROC formula or if the Calculate automatically option is selected in the Hyperblock Output Properties dialog of a hyperblock.

  • OnScriptStart event and uncalculated cells

If the cells of the report are not calculated before the OnScriptStart event is triggered, the event calculates each cell individually. You can ensure that the cells are calculated before the OnScriptStart event is executed by selecting the Calculate automatically option in the Hyperblock Output Properties dialog of a hyperblock. But, as described above, this itself can cause a problem if a global variable is set by the OnScriptStart event.

  • Use of WBC formulas in a report. The value is written back to the database each time the formula is calculated.

Use WBC formulas only within actions.

  • Redundant report cells

During the design of a report you may enter, for example, experimental values in a "working area" of cells. Remove these values if they are not used in the final version of the report. If, for example, the final cell of a report is filled, all cells are copied into View Mode and generated in HTML in Application Studio WebServices.