W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2010

Re: Can a pipeline 'call' itself?

From: David <dlee@calldei.com>
Date: Thu, 29 Jul 2010 08:36:35 -0400
Message-ID: <4C5175D3.4030501@calldei.com>
To: Toman_Vojtech@emc.com
CC: xproc-dev@w3.org
Reguarding performance, I would expect most *single*  xproc steps to 
perform slightly better then the equivalent xquery or xslt step,
but don't count on it.   Often 'under the hood' its doing the same 
thing.  An xproc processor may (and likely does) actually use xquery or 
xslt under the hood to do many of its steps.

Now when you 'pipeline' commands there's a definite difference and its 
implementation specific, don't trust the 'rule of thumb', actually test 
it if performance is critical.
In Calabash (last time I looked) each step recreated the output tree in 
full.  ( Not serialized or parsed, but a copy of the output tree is 
created in memory).
I would expect a multi-step xproc pipeline vs an equivalent multi-step 
xquery or xslt, in calabash, the xquery or xslt would win.

But again, don't generalize, test it with your specific processor, and 
then only if performance is an issue and you have performance problems.

David A. Lee

On 7/29/2010 8:25 AM, Toman_Vojtech@emc.com wrote:
>> On that note, does anyone have any principles or rules of thumb
>> as to when it's best to use xproc and when it's best to do something
>> using xslt?
> While you can use XProc alone for many XML processing/transforming
> tasks, my experience is that once you want to do something more
> complicated, using p:xslt or p:xquery is often the more elegant
> solution. This is not to say that XProc is useless - not at all. There
> is no shame in resorting to XSLT or XQuery simply because these
> languages do a particular task better. The point of XProc is to
> integrate the different XML processing technologies together so that you
> can use them seamlessly, not to replace them.
> Another question is performance. If something can be done with just
> basic XProc (using "simple" standard steps such as p:insert,
> p:add-attribute etc.), I would expect the performance to be better
> compared to p:xslt or p:xquery, where you always have to expect certain
> overhead related to setting up the XSLT/XQuery processor, parsing the
> stylesheet/query etc.
> Regards,
> Vojtech
> --
> Vojtech Toman
> Consultant Software Engineer
> EMC | Information Intelligence Group
> toman_vojtech@emc.com
> http://developer.emc.com/xmltech
Received on Thursday, 29 July 2010 12:37:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC