Bug 40717 - XML forEach tag unacceptably slow
Summary: XML forEach tag unacceptably slow
Status: RESOLVED DUPLICATE of bug 27717
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: nightly
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-10 11:41 UTC by David Winterbourne
Modified: 2006-11-06 15:36 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Winterbourne 2006-10-10 11:41:12 UTC
While profiling our application we identified the JSTL XML forEach tag as a 
serious performance issue. In looking at the implementation it appears that the 
1.1 JSTL XPathUtil class seems to unnecessarily copy every variable from every 
context into an internal object to make the variables available to the XPath 
evaluation object. See 'fillVarStack' in 'selectNodes' method. The JSTL 1.0 
version of XPathUtil doesn't do this at all - it takes a more reasonable 
approach of simply wrapping the original context objects in an object that 
implements the appropriate interface (VariableContext). I would suggest taking 
a similar approach to avoid the unnecessary overhead and garbage created by 
copying all of these objects on every executing of 'doStartTag'.
Comment 1 Henri Yandell 2006-11-06 15:36:23 UTC

*** This bug has been marked as a duplicate of 27717 ***