SAXONICA

Saxon Documentation
Full Contents
About Saxon
Changes in this Release
| Version 8.6.1 (24 November 2005)
| Version 8.6 (3 November 2005)
| Version 8.5.1 (26 August 2005)
| Version 8.5 (2 August 2005)
» | Version 8.4 (4 April 2005)
| Version 8.3 (11 February 2005)
| Version 8.2 (21 December 2004)
| Version 8.1.1 (8 October 2004)
| Version 8.1 (24 September 2004)
| Version 8.0 (1 June 2004)
Conditions of Use
Using XSLT 2.0
Using XQuery
Handling Source Documents
XML Schema Processing
The XPath API
Standards Conformance
Extensibility
Saxon Extensions
Sample Saxon Applications
The Saxon SQL Extension
XSLT Elements
XPath 2.0 Expression Syntax
Function Library
XSLT Patterns

# Pull Processing

The experimental facility for pull processing, first introduced in Saxon 8.3, has been significantly enhanced. It should still be regarded as experimental. It is now possible to execute a query or transformation in "lazy construction" mode. This means that if the query constructs a tree, the tree is not actually instantiated in memory: instead, the application may read the events comprising the tree (startElement, endElement, and so on) using the `PullProvider` interface directly.

There is a new option called `LazyConstruction` defined in the Configuration. By default, this is switched off. If switched on, a document or element constructor instruction that is evaluated in "pull" mode is evaluated lazily, so the tree is not immediately constructed. Some operations on the resulting virtual node (for example, use of any path expression) will cause the construction to take place, but other operations are possible without ever constructing the node.

The option can be switched on from the Java API for both XSLT and XQuery. For XQuery it can also be switched on from the command line using the `-pull` option.

The performance benefits of this mode have yet to be fully assessed. For most queries, it has little effect. There seem to be some queries that benefit greatly, but others where the performance is worse.

Next