[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is failed key-lookups very slow in Xalan-J 1.2?
* Jeni Tennison <mail@xxxxxxxxxxxxxxxx> [Nov 22. 2000 14:21]: > Just to alleviate a misunderstanding: using an xsl:for-each around the > call to the key function doesn't change the scope of the key function > unless the xsl:for-each selects nodes in a different document. The > key function *always* looks throughout the entire document for nodes > matching its 'match' pattern. Thanks. You were right in assuming that I had misunderstood this. I have had reports from others on the Xalan list that say that they experience similar behaviour, so hopefully I can get an answer whether this is a bug in Xalan (which I have a strong suspicion of) or not. I revised my code very similar to yours in order to avoid the lookup if I can - based on the value of ACCESSCODE - but when we use this in a broader sense I cannot do so. Thanks anyway for the suggestion. > I would have thought that narrowing the scope of the key will only > decrease the time involved if there are VALUENUMs that you're not > interested in at all. If that's the case, then its best to filter > them out using the key's 'match' pattern. For example, if there are > VALUENUMs in table0 that you are interested in *and* VALUENUMs in > the table1 that you're never interested in, then you could change the > match patten to: > > <xsl:key name="price-for" > match="table0/record0/VALUENUM" > use="../PRICEKEY"/> This might be a good suggestion. I will try it out if the Xalan people do not respond. > The other thing is that it's always possible that this is a Xalan bug > - make sure you have the latest version and see whether the Xalan > support team can help at all - or a problem to do with the version of > the Java virtual machine that you're using - as Mike reported > yesterday, Sun's JDK 1.3 can sometimes be a lot faster than > Microsoft's JVM. I am developing with Visual Age for Java (which has a rather slow Java implementation) and benchmarking with Tomcat running with JDK-1.3 from Sun so unfortunately there isn't much to get there. Thanks for your very elaborate reply! -- Thorbjørn Ravn Andersen "...sound of... Tubular Bells!" http://bigfoot.com/~thunderbear XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|