tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebdotv <>
Subject Another attempt at discussing the major performance issue in Tomcat 8 JSP
Date Thu, 08 Oct 2015 09:28:48 GMT
There have been quite a few attempts by others at notifying the issue, so
far without an acceptable answer. Here's yet another attempt.

With Tomcat 8 (as of 8.0.27), the following simple tag:

<%@ attribute name="attr1" required="true" %>
<%@ attribute name="attr2" required="false" %>
${attr1} ${attr2}

will result when called in 12 calls to loadClass, for every request, with a
dramatic performance impact:
3x java.lang.attr2
3x javax.servlet.attr2
3x javax.servlet.jsp.attr2
3x javax.servlet.http.attr2

The workaround is to scope the optional attribute reference, e.g.
${pageContext.attr2}, but this might not be acceptable depending on the
number of JSP/tags to update.

I believe the following points need to be addressed:
- what is so special with optional attributes, should they really be
considered undefined?
- if everything is conform with the spec, a more aggressive cache should
probably be implemented and used by ImportHandler

Related discussions/bugs:
- most of

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message