[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XALAN-FOP Performance and Push-Pull Processing

Subject: Re: [xsl] XALAN-FOP Performance and Push-Pull Processing
From: cfisher@xxxxxxx
Date: Tue, 18 Jan 2005 12:51:46 -0600

Curtis Fisher
Contractor - Manpower Professional Services

             David Carlisle                                                
             >                                                          To 
             01/18/2005 11:07                                           cc 
                                       Re: [xsl] XALAN-FOP Performance and 
             Please respond to         Push-Pull Processing                

Curtis asks:
I have been searching for a thread related to performance with the two
types of programming styles.  MK's books give me some insight as to what
types of overhead can occur in an XSL Transformation, but I need a little
more empirical evidence related to XALAN.  Can anyone point me to a thread
or offer an opinion that points to performance impacts/issues, specifically
when employing each programming style?

David replied:
I don't really see it as a performance issue: it's more a matter of
getting different output. If you want the structure of your output to be
determined by the structure of the input (as common when formatting a
textual document) you want a push style. If you want the structure of
the output to be determined by the structure of your stylesheet (as
common when generating reports from database queries and other
table structured data) you want a pull style.
Curtis asks again...
I understand this distinction, but what about the node processing overhead
that would occur for one verses the other?  Is more memory used because of
the way in which XPath expressions are used to locate specific nodes in a
Pull style, or would the Push result in more memory usage?  I realize I'm
being very general in framing the question, but just as certain styles of
programming affect performance in other languages (single long routines, or
small routines, broken into short bursts to accomplish the same thing), I
wish to find out what the most efficient route is for performance.  If
there is one.  I have read many threads here related to writing more
efficient transforms and benchmarks for Saxon or XALAN being a topic now
and then, but is there a rule of thumb for writing templates that helps

Curtis asked:
Also, if Push is used within a template rule as well as Pull, does the XSL
Template revert to the same rules used for Push?

David replied:
There are no separate rules. Or any clear distinction between the
styles, push style  tends to have lots of templates each calling
apply-templates so that at run time they may be called in any order,
depending on the document. pull style tends to have fewer, or in the
extreme case, just one template, matching the root of the document.
There are of course many styles which fall between these extremes (which
is where most stylesheets live in practice).
Curtis explains and asks again:
I think my using the term "rules" kinda' clouded what I really was getting
at; take a database example, a database builds a query plan and executes it
in memory, the optimizer decides how to build the plan based on rules.
These optimizers can sometimes be overridden or given other flags on how to
build a plan for a specific query.  Are XSLT processors such as Saxon or
XALAN built with anything internal that determines the processing based on
something as simple as Push or Pull, or anything else?

Thanks ahead of time for you patience Dave...


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread