users@glassfish.java.net

Re: Compiling JSP is slow on v3

From: <glassfish_at_javadesktop.org>
Date: Thu, 02 Sep 2010 14:10:17 PDT

It got my attention too! :-)

Not that I don't believe you, but it's hard to imagine that JSP compilation of a one line JSP file can cause such a big change in redeployment time. Wish we know what percentage of the deployment time was spent in JSP compilation. What do you get when you deploy your app with precompilejsp set to false?

When you set the logging level to FINE (I did that by editing the file <GF>/domains/domain1/config/logging.properties to include the line org.apache.jasper.level=FINE), you should get the compilation time in server.log:

[#|2010-09-02T13:20:11.147-0700|FINE|glassfish3.1|org.apache.jasper.compiler.Compiler|_ThreadID=16;_ThreadName=Thread-1;ClassName=org.apache.jasper.compiler.Compiler;MethodName=generateJava;|Generated /export/work/v3x/glassfishv3/glassfish/domains/domain1/generated/jsp/Test/org/apache/jsp/test_jsp.java total=111 generate=20 validate=88|#]

[#|2010-09-02T13:20:16.170-0700|FINE|glassfish3.1|org.apache.jasper.compiler.Compiler|_ThreadID=16;_ThreadName=Thread-1;ClassName=org.apache.jasper.compiler.Compiler;MethodName=generateClass;|Compiled /export/work/v3x/glassfishv3/glassfish/domains/domain1/generated/jsp/Test/org/apache/jsp/test_jsp.java 5017ms|#]

The first number is for compiling .jsp to .java, and the second for compiling .java to .class. In this case, javac takes the majority of the time (5017ms vs. 111 ms).
[Message sent by forum member 'kchung']

http://forums.java.net/jive/thread.jspa?messageID=481745