On Mon, 20 Jul 2009, "Michael Kay" <mike@...> writes:
> I'm sorry, I can't provide you with help on this. You're free to make
> a modified version of the Saxon code, but only if you have the skills
> to debug it without assistance.
At least, could you assist me if I do the right thing by counting the
calls to next() method in *Enumeration classeses and is my
dumpTreeStructure() code (~20 lines) is correct? BTW, how general is it
to see higher # of node accesses and then # of nodes in the tree
considering simple XPath queries like //foo/bar?
>> -----Original Message-----
>> From: Volkan YAZICI [mailto:yazicivo@...]
>> Sent: 20 July 2009 12:46
>> To: saxon-help@...
>> Subject: Re: [saxon] Tree Traversal Logs in XPath Query Evaluation
>> On Wed, 15 Jul 2009, "Michael Kay" <mike@...> writes:
>> > Saxon uses many different strategies for evaluating queries. The
>> > TinyTreeWalker is only used on some of these paths.
>> > Most oif the time, queries will access nodes by using the
>> > iterateAxis() methods on TinyNode or its subclasses. Try
>> adding some
>> > tracing there.
>> I created a Tracer class and introduced
>> Tracer.addAccessedNode(node) lines around the code in below files.
>> And after evaluating a query I use
>> Tracer.logAndResetNodeAccess() method to dump the node
>> accesses. Also, to be able to compare the node accesses with
>> actual tree structure I dump the original tree using
>> Tracer.dumpTreeStructure() method. But somehow, accessed node
>> count always appears to be more than the count of nodes in
>> the tree dump. Do you have any ideas about what am I missing?
>> (For code changes, see the attached subversion diff.)