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

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:
.
/* ----  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.
Local fix
Not Available
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 4.0.1           *
*                 developers who use jsp's 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 run time.               *
****************************************************************
* 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/pq53687/v401/PQ53687_Test_AEsServer_AEServer.jar
Comments
 Awaiting response that this
 testFix resolves problem. Another customer opened PQ53588
 for 3.5. Since the code is very similar, first one to
 provide feedback will be used to move both defects out
 of fixTest.
APAR information
APAR number PQ53687
Reported component name WEBSPHERE AE AI
Reported component ID 5630A2200
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2001-10-18
Closed date 2001-10-30
Last modified date 2002-01-31

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

APAR is sysrouted TO one or more of the following:

Modules/Macros
JSP          

Fix information
Fixed component name WEBSPHERE AE AI
Fixed component ID 5630A2200

Applicable component levels
R400 PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ53687
IBM Group: Software Group
Modified date: Jan 31, 2002