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 2010/11/01 20:17:47 UTC

DO NOT REPLY [Bug 50192] New: performance issue after revision 746425

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

           Summary: performance issue after revision 746425
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: robert_goff828@yahoo.com


Revision 746425 changed at least 2 files: ELResolverImpl and ELContextImpl.  I
believe this causes an unnecessary performance regression in these two files.

In ELResolverImpl, every time that getDefaultResolver is called with security
enabled, a new Object is going to be created.  It appears as if
getDefaultResolver is going to be called a lot and this could significantly
hurt performance.  I understand changing the DefaultResolver to be private and
allowing access to it through the getter method, however, I don't believe a new
object needs to be created every time the method is called.

In ELContextImpl, why does a new FunctionMapper need to be created for each
ELContextImpl?

Thanks.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 50192] performance issue after revision 746425

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

Robert Goff <ro...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |

--- Comment #3 from Robert Goff <ro...@yahoo.com> 2010-11-11 10:45:02 EST ---
The NullFunctionMapper in ELContextImpl is a final object.  Therefore, it can
not be overridden and the only method that it has is resolveFunction which will
return null.  There is nothing about this object that could present a security
issue.

As far as the ELResolverImpl is concerned, I can see how the static ELResolver
could be accessed and it is possible that it would be altered by a malicious
user.  However, I think that there could still be a performance gain here by
not having each method withing the ELResolverImpl call getDefaultResolver(). 
Instead, you could create one defaultResolver for this particular instance (in
the constructor) allowing all the methods for this instance to use that object,
and you could still provide the static getDefaultResolver() method to return a
new object each time.  This would at least save a few new constructions of the
ELResolver when you're reusing the same ELResolverImpl object.

Please look at the patch to see the recommended change.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 50192] performance issue after revision 746425

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

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

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

--- Comment #1 from Mark Thomas <ma...@apache.org> 2010-11-09 10:13:17 EST ---
The reasoning for this change is in the archives:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?r1=729825&r2=729824&pathrev=729825

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 50192] performance issue after revision 746425

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

--- Comment #2 from Robert Goff <ro...@yahoo.com> 2010-11-11 10:43:05 EST ---
Created an attachment (id=26282)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26282)
shared defaultResolver for each ELResolverImpl instance and reverts
ELContextImpl

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 50192] performance issue after revision 746425

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Mark Thomas <ma...@apache.org> 2010-11-12 13:30:36 EST ---
Thanks for the analysis and the patch. I applied a slightly different version
to 7.0.x that will be include din 7.0.5 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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