xsl-list
[Top] [All Lists]

Re: performance issues saxon

2003-02-18 08:16:15
well yeah I have actually used the keys for the second step..( was a mistake
when I reproduced the actual problem)
Any Idea about the performance of Saxon Under Tru64 Unix Box?
Thanks
Vasu
----- Original Message -----
From: "Michael Kay" <michael(_dot_)h(_dot_)kay(_at_)ntlworld(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, February 18, 2003 1:49 PM
Subject: RE: [xsl] performance issues saxon


Ok if  the requirement is to group all the products of the
same id together, I would follow the following steps. 1. Get
all the unique nodes 2. Group all the products with the id as
defined by the id of the unique node.


Is there any other way we could avoid using two nested  loops
for a requirement like this? Thanks Vasu

Absolutely. Muenchian grouping solves this in O(n log n) time. See
www.jenitennison.com/xslt/grouping for the algorithm.

Actually it's essentially the algorithm you described above. Step 1
requires a serial scan of the document, Step 2 requires an index lookup
using a key. Your mistake was to do step 2 with a (second, nested)
serial scan.

Michael Kay
Software AG
home: Michael(_dot_)H(_dot_)Kay(_at_)ntlworld(_dot_)com
work: Michael(_dot_)Kay(_at_)softwareag(_dot_)com



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>