You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2012/09/19 08:19:56 UTC

[Bug 53897] New: Customized EL resolver to improve the performance of EL resolving

https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

          Priority: P2
            Bug ID: 53897
          Assignee: dev@tomcat.apache.org
           Summary: Customized EL resolver to improve the performance of
                    EL resolving
          Severity: enhancement
    Classification: Unclassified
          Reporter: xshao@ebay.com
          Hardware: PC
            Status: NEW
           Version: trunk
         Component: Jasper
           Product: Tomcat 7

Created attachment 29393
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29393&action=edit
Comparison test case

CustomizedELResolver is to simplify and make it efficient for EL resolving.

1. The code in CustomizedELResolver is copied from CompositeELResolver.
 2. Performance tuning is focus on getValue, because it was the big hotspot of
one page hit if the page includes many ELs.
 3. getValue switchs by "base"
 If the base is null, it follows next steps to check value,
 A. ImplicitObjectELResolverImpl(Optimized from ImplicitObjectELResolverImpl)
 B. Extended ELResolvers
 C. ScopedAttributeELResolverImpl(Extends ScopedAttributeELResolverImpl,
supports get value by property name)

 Else the base is not null, it checks extended ELResolvers first, then tries to
get value from Map, ResourceBundle, List, Array or Bean one by one until the
property was resolved.

Q: Why split extSize == 1 to another block ?
 A: To avoid an additional "context.setPropertyResolved(false);"

Q: Why check value from Map, ResourceBundle, List and Array directly in
CustomizedELResolver ?
 A To avoid extra valiation in ELResolver.getValue.

Description for attached files.
 1. CustomizedELResolver: The implementation for this fix.
 2 JspApplicationContextImpl.diff : Patch for how to apply this new resolver.
 3. ScopedAttributeELResolverImpl.java: Extension of
ScopedAttributeELResolverImpl.
 4. TestPageContext.java: Test case to compare the new ELResolver with
CompositeELResolver
 5. ImplicitObjectELResolverImpl.java: related with another bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=53895

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

--- Comment #3 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29396
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29396&action=edit
Patch for how to apply this CustomizdELResolver

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Yep, the resolver needs to be an instance of CompositeELResolver. The patch in
the duplicate is also easier to read. I intend to progress the duplicate rather
than this one.

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

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29394|0                           |1
           is patch|                            |
  Attachment #29394|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29395|0                           |1
           is patch|                            |
  Attachment #29395|application/octet-stream    |text/plain
          mime type|                            |

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

--- Comment #5 from Jarek Gawor <jg...@gmail.com> ---
This is essentially a duplicate of
https://issues.apache.org/bugzilla/show_bug.cgi?id=53896. From my reading of
the JSP 2.2 spec (section 2.9), it implies that the ELResolver used by JSP
application should be an CompositeELResolver (which the JasperELResolver.java
in 53896 is).

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

--- Comment #2 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29395
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29395&action=edit
Extension of ScopedAttributeELResolver

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

--- Comment #1 from Sheldon Shao <xs...@ebay.com> ---
Created attachment 29394
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29394&action=edit
CustomizedELResolver

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 53897] Customized EL resolver to improve the performance of EL resolving

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53897

Sheldon Shao <xs...@ebay.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #4 from Sheldon Shao <xs...@ebay.com> ---
Related with https://issues.apache.org/bugzilla/show_bug.cgi?id=53896

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org