Hitachi

uCosminexus Application Server XML Processor User Guide


3.4.9 Tuning the Pre-Parse XML document

If you reference the tuning information of the Pre-Parse XML document, you can examine whether the high-speed parse support function is running effectively. The parsing speed can be improved by optimizing the Pre-Parse XML document based on the examination results.

This subsection describes the types of the tuning information of Pre-Parse XML document, and also describes how to use and output the information.

Organization of this subsection

(1) Types of tuning information

The following two types of files can be output as the tuning information:

The information about the matching process when parsing is output to these files. The matching process is used to determine whether you can use the information about the preparsed object when parsing. The cases where you can use the information about the preparsed object are referred to as successful in matching process, while the cases where you cannot use the information about the preparsed object are referred to as failed matching process.

Each file is as follows:

(a) Tuning summary file

The success rate of the matching process, file names of the Pre-Parse XML document used to generate the preparsed object, system identifier of the XML document for parsing and tuning details file name is output for each parsing in which the high-speed parse support function is used. You can examine the extent of effective usage of the preparsed object in parsing with the high-speed parse support function.

For details about the tuning summary file, see 3.4.10 Details of the tuning summary file.

(b) Tuning details file

Besides the information about the tuning summary file, the history of the matching process is output for a single parsing in which the high-speed parse support function is used. For the parsing executed using the high-speed parse support function, you can examine the details of the location where the matching process has failed.

For details about the tuning details file, see 3.4.11 Details of the tuning details file.

(2) How to use the tuning information

The details on how to use the tuning information is as follows:

  1. Output the tuning information.

    For details about how to output the tuning information, see 3.4.9 (3) How to output the tuning information.

  2. Reference the tuning summary file, and extract the parsing with a low success rate in matching process.

    A low success rate of the matching process indicates that there is a vast difference between the structure of the Pre-Parse XML document, which is studied by the preparsed object, and the structure of the XML document for parsing, and the high-speed parse support function is not operating effectively.

  3. Reference the tuning details file for each parsing extracted in step 2, and examine the history of the locations at which the matching process has failed.

    Examine the history of the locations where the matching process has failed, and extract the parts where the structure of the Pre-Parse XML document does not match the structure of the XML document for parsing.

  4. Revise the Pre-Parse XML document.

    Revise the Pre-Parse XML document based on the examination results of step 3. For details about the policy for creating the Pre-Parse XML document, see 3.4.3 Creating the Pre-Parse XML document.

    Important note

    If the success rate of the matching process is low the effect of the high-speed parse support function will reduce, even if all elements and attributes described in the XML document for parsing are included in the Pre-Parse XML document.

    An example when the success rate of the matching process is low even if all elements and attributes described in the XML document for parsing are included in the Pre-Parse XML document is as follows.

    [Figure]

    In this example, as the remark element is omitted in the XML document for parsing, the matching process for the remark element would fail, and the failure history will be recorded in the tuning details file. As a result, the success rate of the matching process will decline.

(3) How to output the tuning information

To output the tuning information, you must set up the system property provided by Cosminexus XML Processor. To output the tuning information with high-speed parse using PreparsedObject, besides the setup of the system property, you must set up true in the setTuningInfoFlag method of the PreparsedObjectFactory class, and then generate PreparsedObject. For details about the PreparsedObjectFactory class, see 3.4.7(1) PreparsedObjectFactory class.

The system property used to output the tuning information, the output destination of the tuning information, and the operation when an error occurs is as follows.

Important note

The parsing performance deteriorates when the tuning information is output. Therefore, output the tuning information only when evaluating the performance of the high-speed parse support function.

(a) System property used to output the tuning information

System property name

com.cosminexus.jaxp.preparsedxml.tuning.level

Value
  • When OFF or when this property is not set up: The tuning information is not output

  • INFO: The tuning information is output

Assumed that OFF is specified when other than INFO in upper case is specified.

(b) Output destination of the tuning information

The tuning information is output when parsing with the high-speed parse support function terminates. The output destination of the tuning information is determined in the following order:

  1. Server-log-output-directory#/jaxp

    #: The server-log-output-directory differs depending on the server in use.

    For the J2EE server

    The directory specified in the ejb.server.log.directory key of the option definition file (usrconf.cfg) of J2EE server. By default, it is the following directory:

    Cosminexus-work-directory/ejb/server-name/logs

    For the Web container server

    The directory specified in the web.server.log.directory key of the option definition file (usrconf.cfg) of Web container server. By default, it is the following directory:

    Cosminexus-installation-directory/CC/web/containers/server-name/logs

  2. Directory-that-can-be-acquired-with-the-user.dir-system-property/logs/jaxp

A file with the same name will be overwritten. If a file with the same name exists, save that file, as and when required. For details about the rules for file names, see 3.4.10(1) File name (tuning summary file) and 3.4.11(1) File name (tuning details file).

The tuning summary file and tuning details file are not deleted automatically. Delete these files as and when required. For details about the upper-limit value of the file size of the tuning summary file, see 3.4.10(3) Upper-limit value of the file size. For details about the upper-limit value of the total file size of tuning details file, see 3.4.11(3) Upper-limit value of the total file size.

(c) Operation when an error occurs

The operation performed when the tuning information cannot be output for occurrence of an error is as follows:

When an I/O error occurs

If an I/O error occurs during the output of the tuning summary file and tuning details file, these files will not be output. Also, the exception IOException occurs.

When an error occurs when parsing the XML document

The information will not be output to the tuning summary file. The information until the occurrence of the error will be output to the tuning details file.