Prerequisites for High Performance

Top Previous Topic Next Topic  Print this topic

Making sure the documents work with XF Rendering Server 2013:

XF Rendering Server 2013 is able to process input documents of any size because content is discarded immediately when it is no longer needed.

However, a minimum set of rules must be followed by the user when creating the documents:

 

Repeated content must be available in advance.

Headers and footers must be defined before the documents body. Similarly, table headers and footers must be defined before table’s body.

Example 1: Page Headers & Footers

Example 2: Table Headers & Footers

 
Minimizing Memory Usage:

Table cells should not expand on too many pages.

The user should avoid placing a major part of a document inside a single fo:table-cell element because table rows need to be kept in memory until all their cells are completed.

List item labels should not expand on too many pages.

The user should avoid placing a major part of a document inside a single fo:list-item-label element. List items need to be kept in memory until their label element is fully processed (because their body needs to be processed afterwards).

Automatic table layout should be avoided whenever possible.

By default, XSL-FO tables use automatic layout. This option, however, when enabled on very large tables, will increase the engine's memory usage. This occurs because the entire table will need to be loaded into memory to correctly determine column widths and to be able to add extra columns/cells as necessary. If the entire document is composed of one large auto layout table, then the memory footprint during the processing of the document would be twice than that of the equivalent fixed layout table. To minimize memory usage, the users must consider using a fixed layout instead. Also, the users must make sure to define the widths of all table columns. Both lengths and percentages may be used. Not specifying all column widths on fixed table layout will cause the engine to issue an error and stop processing.

 
Improving Processing Speed:

The resolver thread for documents without references must be disabled.

The resolver thread is only needed for documents with references (fo:page-number-citation, fo:retrieve-marker, fo:retrieve-table-marker). If the user does not cite the object id-s or does not wish to display the number of pages in a document, then the resolver thread must be disabled in order to ensure maximum processing speed. This is an advanced option and is available only when calling the engine programmatically. For more details, the Programming Manuals are available for consulting.

All tables should use a fixed layout and should have defined column widths.

By default, XSL-FO tables use automatic layout. This option, however, when enabled on very large tables, will cause a performance penalty, in terms of both processing speed and memory usage. To improve processing speed, the user consider using a fixed layout instead. Also, the user must make sure to define the widths of all table columns. Both lengths and percentages may be used. Not specifying all column widths on fixed table layouts will cause the engine to issue an error and stop processing.

Example 1: Table Columns