# Implementation changes

The way that tracing works (the -T option) has been changed. If tracing is enabled at compile time, a trace instruction is wrapped around every "real" instruction to contain the trace logic. This means there are no run-time checks whether tracing is enabled, except for the instructions such as `xsl:apply-templates` and `xsl:for-each` that trace changes to the context item.

In XQuery, the code generated for tree construction is in many cases more efficient, avoiding the need to construct temporary trees and then copy them unnecessarily.

Next