Message tree navigation and copying
Message tree navigation and message tree copying can reduce message flow performance, so it is important to use them appropriately and limit their usage where possible.
Before you begin
Read the following topics:
About this task
Long paths are inefficient, so ensure that you minimize their usage, particularly in loops. Using reference variables and pointers in ESQL and Java™ can improve performance. Where possible, build a smaller message tree by using compact parsers such as DFDL, XMLNSC, MRM XML, RFH2C, and use opaque parsing.
Message tree copying is also costly in
terms of resources, because it causes the logical tree to be duplicated
in memory. You can improve performance by reducing the number of times
that the message tree is copied, by using the following techniques:
- Reduce the number of Compute and JavaCompute nodes in a message flow
- If possible, set the Compute Mode property on the node to not include the message
- Copy at an appropriate level in the message tree; for example, copy once rather than for multiple branch nodes
- Copy data to the environment; however, remember that changes are not backed out
In addition to these techniques, the effect of copying the message tree is reduced if you also reduce the size of the message tree by using compact parsers and opaque parsing. For more information, see Parsing and message flow performance.