Tree Access Order and Path References

Message trees are a complex data structure that behave much like a doubly linked list. Try to be sensitive to the fact that the performance of references to parent.child will vary depending on the number of children and the position in the list of the child you reference.

Ways to optimize performance include:
  • locating often referenced items near the top of a child list
  • defining reference variables for complex element paths in order to avoid repeated evaluations
  • avoid generic recursive tree walks