You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Rainer Klute <ra...@gmx.de> on 2001/02/06 11:08:50 UTC

Re: [Xalan-J 2 BUG] Slow template recursion

Hi,

I think I tracked the problem I have with extremly bad Xalan-J 2 performance
down to template recursion. I have a template which gets a node-set as a
parameter. It separates the node-set into the last node in the set and those
before the last and puts both into separate template-local variables. Depending
on a condition it then calls itself recursively with the original node-set
minus the last node.

The performance depends on the recursion depth. If there are only 3 nodes in
the original node-set, the processing speed is acceptable. But if I have a
recursion depth of 10 you can no longer speak of any "performance" at all. The
processing time of each recursion step seems the grow exponentially.
(Removing some unnecessary code I could "optimize" the Xalan 2 processing time from
7 minutes down to 4 minutes, but Xalan 1 still processes it in 4 seconds.)

My guess is that when I assign a node-set to a variable, the latter does not
store the node-set but instead an algorithm to evaluate the node-set.

Is it possible to change that?

-- 
Best regards
Rainer Klute

  Dipl.-Inform.                     E-Mail: rainer.klute@epost.de
  Rainer Klute                        Tel.: (0172) 2324824
  K�rner Grund 24                           (0231) 511693
D-44143 Dortmund                       Fax: (0231) 511809

Sent through GMX FreeMail - http://www.gmx.net