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 number | PQ53588 | Reported component name | WAS ADVANCED AI | Reported component ID | 5648C8400 | Reported release | 350 | 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:
APAR is sysrouted TO one or more of the following:APAR is sysrouted FROM one or more of the following:
PQ53687
Modules/Macros APAR is sysrouted TO one or more of the following:PQ53687Modules/Macros
|
Fix information |
Fixed component name | WAS ADVANCED AI | Fixed component ID | 5648C8400 |
Applicable component levels | R350 PSY | UP |
|