- Print
- PDF
General guidance for improving the performance for reports can be found here.
Memory, Cache Control, and Performance
Overview
Lasernet FO Connector includes an option to disable the saving of records in memory (cache of the records). This feature was introduced in version 6.16.
The advantage of saving records in memory is data/fields are retrieved faster if information (tables/fields) needs to be re-used.
The disadvantage is the consumption of memory when the cache is enabled.
It takes time (not a lot) to save record(s) in memory. In some scenarios, it is possible to obtain better performance by disabling the cache. This is especially applicable if a low number of fields are re-used. For example, when most of the data is added using the Query wizard and not in the Structure form.
The following is an example of processing a report that contains yellow elements, which indicate that the elements have not been added using the Query wizard.
The Performance indicators can be used to identify the best cache control for a report (refer to the Performance indicators section of this guide for more information).
If the cache is enabled, the yellow elements do not take as much time to process:
Cache disabled:
When testing, it is important to run the same report multiple times, as the system caches the report definition and Query the first time the report is executed. Different tests are needed to identify the best/optimal performance settings for the cache.
Cache Control
The Cache control can be changed by navigating to Lasernet > Common > Reports > Cache control.
Default: Use the default setting defined within the Lasernet parameters.
Use cache: Save record(s) in memory both when running report(s) in batch and through UI.
Disable cache: Never save record(s) in memory.
Disable cache in batch: Save record(s) in memory when running the report(s) from UI but not when running with a batch task. Disable cache in batch is useful to lower memory usage when running batch tasks, such as when posting and printing invoices.
Performance / Limit Size of Report-Definition
This feature was introduced in Lasernet FO Connector 6.16 and it works by optimizing a record containing the report-definition/structure to a minimum size.
This is achieved by moving the Stylesheets (Transformation Stylesheet and Sorting Stylesheet) from the existing table to a new table.
Having Stylesheets within a separate table ensures that they are only loaded when needed.
Stylesheets are moved from an existing table to a new table when the record containing the report definition gets updated. For example, when saving, importing, or modifying a report.
Technical Details
Existing table containing the report definition:
Table name: LACReport
New table containing the Stylesheets where the Stylesheets are moved:
Table name: LACReportStyleSheets
Identify the Best Cache Control Settings
To identify the best cache control settings, follow these steps:
Run a number of report runs, such as report runs with 10/100/1000 reports.
Change the Cache control.
Example Test Run
Open Batch print schedule (Top picking) by navigating to Lasernet > Test and performance suite > Performance > Batch print schedule (Top picking).
Select the required Report name and Table name.
Enter a dummy destination, such as Lasernet Fax: 0000 (a dummy destination is used because the testing of performance is for Lasernet FO Connector and not for the Lasernet server):
Enable Run in batch and set the Number of tasks/threads. For example, 2/4/8/etc.
Enable Log per report, Log CPU, and Log memory usage and set Log performance on every ’x’ report to 1.
Set Open review form to Yes to ensure the Batch print review form automatically opens after the Scheduler settings are entered.
Set a Filter so that 100 reports are created for this performance test.
Run the performance test.
Check the logging in relation to execution time per report, CPU usage, and memory usage in the Batch print review form:
10\ Change the Cache control on the report, then perform the test again.
11. Compare the differences in the logging in the Batch print review form to see which cache control setting gave the best performance.