Thanks Mark.

Two demo apps with a single jsp are available at: 
http://www.datafilehost.com/download-eec20011.html

Just call for JSF 1.2
http://<server>:<port>/jsf12/faces/100hout.jsp
http://<server>:<port>/jsf12/faces/1000hout.jsp
http://<server>:<port>/jsf12/faces/2000hout.jsp

for JSF 1.1
http://<server>:<port>/jsf11/faces/1000hout.jsp


The compiled jsps are also available as attachment of 
https://issues.apache.org/bugzilla/show_bug.cgi?id=48750

I patched org.apache.jasper.compiler.Generator and removed the AnnotationHelper.
The compiled jsps did not contain these calls anymore but this did not have any 
noticeable effect on performance.

I did some more tests with Tomcat and Jetty:
1) 100 outputtags:        Tomcat: 3ms   Jetty: 3ms
2) 1000 outputtags:   Tomcat 72ms  Jetty 41ms
3) 2000 outputtags:   Tomcat 190ms  Jetty 174ms   

Both servers were started with same jdk and same vm params.

Another difference between the compiled jsps are value expressions:
Tomcat JSF 1.2:
_jspx_th_h_005foutputText_005f999.setValue(new 
org.apache.jasper.el.JspValueExpression("/1000hout.jsp(1021,0) 
'1'",_el_expressionfactory.createValueExpression("1",java.lang.Object.class)));
_jspx_th_h_005foutputText_005f999.setStyle(new 
org.apache.jasper.el.JspValueExpression("/1000hout.jsp(1021,0) 'z 
index:29202;'",_el_expressionfactory.createValueExpression("z-index:29202;",java.lang.Object.class)));
   
Jetty JSF 1.2
_jspx_th_h_outputText_999.setValue(org.apache.jasper.runtime.PageContextImpl.getValueExpression("1",
 (PageContext)_jspx_page_context, java.lang.Object.class, null));
_jspx_th_h_outputText_999.setStyle(org.apache.jasper.runtime.PageContextImpl.getValueExpression("z-index:29202;",
 (PageContext)_jspx_page_context, java.lang.Object.class, null));

Tomcat JSF 1.1 (for completeness):
_jspx_th_h_005foutputText_005f999.setValue("1");
_jspx_th_h_005foutputText_005f999.setStyle("z-index:29202;");

I did not find any hotspots >3% in the sample with 1000 tags.
I tried to nail down the performance problem we are seeing in our real app but 
this seems to be not so trivial.

Michael

-----Original Message-----
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Dienstag, 16. Februar 2010 22:54
To: Tomcat Users List
Subject: Re: performance problems with Tomcat 6 and JSF 1.2

On 16/02/2010 21:39, Christopher Schultz wrote:
> Mark Thomas is a frequent contributor to this list and, if he's
> got time and you're willing to help, he's quite likely to help
> investigate and maybe work on a solution.

It is on my radar but I haven't had time to look at it yet. There is at
least one duplicate of 48600. Between the various bugs I think there is
a test case but it would be good to make sure. The ideal would be:
- test case that demonstrates the problem (as simple as possible, with
source, a single JSP is ideal)
- a clean patch in diff -u format against trunk that includes
documentation as appropriate

Essentially, the easier it is for a committer to understand the problem,
repeat the issue, understand the patch, apply the patch and test the
patch, the quicker fixes find their way into the codebase.

Mark





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


Reply via email to