Bug 53896 - Optimized Jasper ELResolver
Optimized Jasper ELResolver
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Jasper
unspecified
PC Linux
: P2 enhancement (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
: 53897 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-09-19 06:17 UTC by Jarek Gawor
Modified: 2012-10-27 19:53 UTC (History)
1 user (show)



Attachments
Optimized Jasper EL resolver (7.56 KB, patch)
2012-09-19 06:31 UTC, Jarek Gawor
Details | Diff
Optimized Jasper EL resolver (7.36 KB, patch)
2012-10-02 01:48 UTC, Jarek Gawor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.