Bug 53896

Summary: Optimized Jasper ELResolver
Product: Tomcat 7 Reporter: Jarek Gawor <jgawor>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement CC: xshao
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Optimized Jasper EL resolver
Optimized Jasper EL resolver

Description Jarek Gawor 2012-09-19 06:17:47 UTC
JspApplicationContextImpl sets up a CompositeELResolver with the standard and application-specific EL resolvers. The CompositeELResolver implementation basically just invokes every ELResolver in the list until a value is successfully resolved. The issue is that in certain situations some ELResolvers are called needlessly. For example, if base != null, calling getValue() on ImplicitObjectELResolver is unnecessary. So there are cases in which certain ELResolvers can be skipped over. In EL heavy applications skipping over certain ELResolvers can quickly add up.
Comment 1 Jarek Gawor 2012-09-19 06:31:44 UTC
Created attachment 29397 [details]
Optimized Jasper EL resolver

I attached an optimized Jasper EL resolver. The resolver extends and functions like a CompositeELResolver but skips over certain resolvers as possible.
Comment 2 Mark Thomas 2012-09-19 19:21:55 UTC
Correct priority
Comment 3 Jarek Gawor 2012-10-02 01:48:22 UTC
Created attachment 29431 [details]
Optimized Jasper EL resolver

An updated version of the patch.
Comment 4 Mark Thomas 2012-10-27 19:22:38 UTC
*** Bug 53897 has been marked as a duplicate of this bug. ***
Comment 5 Mark Thomas 2012-10-27 19:53:33 UTC
Many thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.33 onwards.