DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11661>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11661 xsl:key very very slow! ------- Additional Comments From [EMAIL PROTECTED] 2002-10-08 13:51 ------- I managed to reproduce the bug with a simple testcase. So I will attach it. It can be run with the command : java org.apache.xalan.xslt.Process -in input.xml -xsl file:testCase.xsl -out output.txt With Xalan 2.3.1, it takes 7 seconds to complete. With Xalan 2.4.0, it takes 1 min 47 sec to complete. I also developped a patch, which is also attached. The patch applies to only one class : org.apache.xalan.transformer.KeyTable With the patch, the testcase duration is brought back to 7 seconds. Technical note : Profiling xalan 2.4.0 on my test case, I noticed that the method KeyRefIterator.filterNode was executed n*n times where n is the number of nodes in input xml file. The cumultated time of this method was 96% of total test execution time. So I modified KeyTable to cache the mapping of each key. The KeyRefIterator class is not used anymore. I am not sure that the patch is 100% correct, but, at least, it works for me.
