Parsing and message flow performance

Understand the impact of parsing on message flow performance, and use techniques to limit the effect and improve performance.

Before you begin

About this task

Parsing is the means of populating and serializing the message tree from the data, and it can occur whenever the message body is accessed. Multiple parsers are available, and the message complexity varies together with the cost in terms of performance. You can minimize the impact of parsing on message flow performance in the following ways:

Procedure

  • Identify the message type as quickly as possible, and avoid using multiple parses to find it.
  • Use the most efficient parser available, such as XMLNSC for XML parsing, and DFDL for non-XML parsing. For more information about parsing, see Parsers and Available parsers.
  • Use parser optimization techniques, such as parsing avoidance, partial parsing (parsing on demand), and opaque parsing:
    • If possible, avoid the use of parsing completely, or consider sending only changed data. If you promote or copy key data structures to MQMD, MQRFH2, or JMS properties, you might be able to avoid the need to parse the user data; this technique can be particularly useful for message routing.
    • Partial parsing (known as parsing on demand) involves parsing a message only when it is necessary to resolve the reference to a particular part of its content. For more information, see Parsing on demand.
    • Opaque parsing reduces the size of the message tree, which results in improved performance. You can configure opaque parsing on the Parser Options tab of input nodes. If you enable validation, you cannot use opaque parsing.