https://bz.apache.org/bugzilla/show_bug.cgi?id=62453
Mark Thomas <ma...@apache.org> changed: What |Removed |Added ---------------------------------------------------------------------------- OS| |All --- Comment #1 from Mark Thomas <ma...@apache.org> --- When Tomcat parses "baz.toString()" Tomcat has no way to determine if "baz" is a class name and "toString" is the name of a static method or if "baz" is an attribute and "toString" is an instance method. Tomcat has to do the class lookup to find out. The optimisation that was implemented in bug 57583 does not apply in this case. In this simple case removing the "toString()" calls would improve performance (it would allow the optimisation from bug 57583 to work) as there is an implicit toString() in the EL evaluation. In a more complex case the only way for an application to ensure it avoids the expensive lookup is to use an explicit scope with the attributes. i.e.: <div>foo: ${pageScope.foo.toString()}</div> etc. Generally, explicitly stating the scope is the best approach. It allows faster execution and does not depend on any container specific optimisation. I've been taking a look at the code to see if there is anything further that can be done in terms of optimisation. There are additional special cases we could handle in a similar manner to bug 57583 but every special case adds complexity and maintenance overhead. I'm not sure at this point if the additional benefits are worth the cost. I need to run a few tests. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org