PQ53588: PERFORMANCE PROBLEM WITH CUSTOM TAGS IN JSP 1.1 ON WEBSPHERE 3.5AND 4.0

A fix is available
WebSphere Application Server Version 4.0 Fix Pack 3 (Version 4.0.3)

APAR

APAR status
Closed as program error.

Error description
In WebSphere application Server 3.5.4 and 4.0 the JSP 1.1 with
Custom tags are 200 times slower than JSPs without custom tags.
TomCat treat these JSPs in a different mode and the performance
are much more better.
.
By examining the Java code fragments generated by Tomcat and
WebSphere for a custom tag in the table JSP we can easily see a
difference (note that both WebSphere and Tomcat use the Jasper
component of Tomcat itself to translate JSPs into Java, so the
code look quite similar).
.
Tomcat code:
.
/* ----  cb:column ---- */
browser.client.jsp.tag.Column _jspx_th_cb_column_4 =
new browser.client.jsp.tag.Column();
_jspx_th_cb_column_4.setPageContext(pageContext);
_jspx_th_cb_column_4.setParent(_jspx_th_cb_row_0);
_jspx_th_cb_column_4.setId("column");
_jspx_th_cb_column_4.setValue("sValue");
_jspx_th_cb_column_4.setName("*");
.
WebSphere code:Tomcat code:./* ----  cb:column ---- */browser.client.jsp.tag.Column _jspx_th_cb_column_4 =new browser.client.jsp.tag.Column();_jspx_th_cb_column_4.setPageContext(pageContext);_jspx_th_cb_column_4.setParent(_jspx_th_cb_row_0);_jspx_th_cb_column_4.setId("column");_jspx_th_cb_column_4.setValue("sValue");_jspx_th_cb_column_4.setName("*");.
. /* ---- cb:column ---- */ browser.client.jsp.tag.Column _jspx_th_cb_column_4 = new browser.client.jsp.tag.Column(); _jspx_th_cb_column_4.setPageContext(pageContext); _jspx_th_cb_column_4.setParent(_jspx_th_cb_row_0); JspRuntimeLibrary.introspecthelper( _jspx_th_cb_column_4, "id","column",null,null, false); JspRuntimeLibrary.introspecthelper( _jspx_th_cb_column_4, "value","sValue",null,null, false); JspRuntimeLibrary.introspecthelper( _jspx_th_cb_column_4, "name","*",null,null, false) . The only difference between the two application servers is that Tomcat instrospects the custom tag implementation class (in this case the browser.client.jsp.tag.Column class) at translation time, and generate directly the calls to the custom tag setter methods, while WebSphere uses the JspRuntimeLibrary.introspecthelper static method of the Jasper component to decide at execution time which method must be called. In turn this method (at least in Tomcat 3.2.2 source code) uses the java.beans.Introspector.getBeanInfo method to obtain the tag implementation class properties via the reflection mechanism. Given the JSP translator of Tomcat 3.2.2 don't use this method at execution time the performance problem is probably originated by the use of an old Jasper version in WebSphere.
WebSphere code:./* ---- cb:column ---- */browser.client.jsp.tag.Column _jspx_th_cb_column_4 =new browser.client.jsp.tag.Column();_jspx_th_cb_column_4.setPageContext(pageContext);_jspx_th_cb_column_4.setParent(_jspx_th_cb_row_0);JspRuntimeLibrary.introspecthelper(_jspx_th_cb_column_4, "id","column",null,null, false);JspRuntimeLibrary.introspecthelper(_jspx_th_cb_column_4, "value","sValue",null,null, false);JspRuntimeLibrary.introspecthelper(_jspx_th_cb_column_4, "name","*",null,null, false).The only difference between the two application servers is thatTomcat instrospects the custom tag implementation class (inthis case the browser.client.jsp.tag.Column class) attranslation time, and generate directly the calls to the customtag setter methods, while WebSphere uses theJspRuntimeLibrary.introspecthelper static method of the Jaspercomponent to decide at execution time which method must becalled. In turn this method (at least in Tomcat 3.2.2 sourcecode) uses the java.beans.Introspector.getBeanInfo method toobtain the tag implementation class properties via thereflection mechanism.Given the JSP translator of Tomcat 3.2.2 don't use thismethod at execution time the performance problem is probablyoriginated by the use of an old Jasper version in WebSphere.
Local fix
Not Available
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 3.5.4           *
*                 developers who use jsp 1.1 and taglibs.      *
****************************************************************
* PROBLEM DESCRIPTION: Performance problems with the original  *
*                      tomcat implementation of taglibs.       *
*                      Testing demonstrated large amounts of   *
*                      time being spent in introspection       *
*                      of beans during runtime.                *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
WebSphere needs to evaluate taglibs at compile time
and not runtime skipping introspection.
Problem conclusion
Removed the dependency on introspection by migrating
code from later versions of jasper.  This moves the
bottleneck from request time to compile time eliminating
the runtime performance problems with taglibs.
Temporary fix
//wasdoc0/apars/pq53588/v354/pq53588_354.jar
Comments
Customer was sent a diag module from development and
was sent this testFix.  Awaiting response that this
testFix resolves problem. Another customer opened PQ53687
for 4.0. Since the code is very similar, first one to
provide feedback will be used to move both defects out
of fixTest.
APAR information
APAR numberPQ53588
Reported component nameWAS ADVANCED AI
Reported component ID5648C8400
Reported release350
StatusCLOSED PER
PENoPE
HIPERNoHIPER
Submitted date2001-10-18
Closed date2001-10-30
Last modified date2002-01-31

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:APAR is sysrouted FROM one or more of the following:

PQ53687

Modules/Macros
JSP
APAR is sysrouted TO one or more of the following:PQ53687Modules/Macros

Fix information
Fixed component nameWAS ADVANCED AI
Fixed component ID5648C8400

Applicable component levels
R350 PSYUP











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, General
Software version: 350
Reference #: PQ53588
IBM Group: Software Group
Modified date: 2002-01-31