[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re[2]: correct use of keys?

Subject: Re[2]: correct use of keys?
From: Kevin Burges <xmldude@xxxxxxxxxxxxxxxx>
Date: Thu, 13 Sep 2001 12:33:30 +0100
Re[2]:  correct use of keys?
Michael + Thomas:

>> I have a stylesheet which, when run on a 10MB doc turns it into a 30MB
>> doc in ~600 seconds.
>> Even for such a large doc, this seems like along time given my machine
>> is a 1.33GHz Athlon, 256MB.

MK> It seems a long time to me, too. Which processor are you using? Are you
MK> getting thrashing due to shortage of memory?

I'm using the latest MSXML 4 (July?). Toward the end of the
transformation there is a small amount of swapping going on, but
certainly not what I'd call thrashing. For the majority of the time
there is virtually no drive access at all.

MK> better off doing a preprocess of the document in which elements whose name
MK> contains 'field' are given an extra attribute, field="yes", and then use
MK> this attribute in the second phase. In any case, I suspect that you are not
MK> interested in all nodes whose name contains 'field', but only in elements
MK> whose name contains 'field'. Replacing "node()" by "*" will speed things up
MK> a bit.

I tried this in a couple of stages:
        Changing "node()" to "*" made no difference
        Using "field = 'yes'" instead of "contains(....)" made no

I also tried using specifically
  "*[(name() = 'field') or (name() = 'datefield') or (name() =
This also made no difference.

In fact, when I used the "field = 'yes'" method, the Win2k task
manager said my program was using up to 175MB memory, where
previously I had not seen it above 105MB.

TP> Then I suggest that you temporarily change the stylesheet so it
TP> outputs only one node where it has to use one of the keys, and see
TP> how long it takes. This will check whether compiling the
TP> stylesheet and building the key indices is taking an inordinately
TP> long time.

I tried this, and the index was generated instantly. Presumably
because the document that is being indexed is fairly small.

TP> Another thing is whether you are testing out the transfomation in
TP> an environment where the result is displayed in a browser (like
TP> XML Cooktop or XML Spy).

No, I'm transforming programatically in VB so that's not an issue.

One thing I did notice is that if the keys are empty (I had made a
mistake), the transform only takes 60 seconds as opposed to 600.

This suggests surely that there must either be something wrong with
the way I am using the keys (so they are being ineffectual), or MSXML
has a very poor implementation of keys. Any other suggestions???

groovy baby,
 Kevin                    mailto:xmldude@xxxxxxxxxxxxxxxx

++++++++++++ Cool music - http://burieddreams.com/marshan
++++++ Attitude Webzine - http://burieddreams.com/attitude

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.