On 3/11/2011 6:04 AM, Jess Holle wrote:
On 3/11/2011 3:22 AM, Mark Thomas wrote:
The obvious difference is that Tomcat 6 compilation targets Java 5
whereas Tomcat 7 targets Java 6. For a simple test JSP:
Tomcat 6 (1.5) - 3,488
Tomcat 7 (1.5) - 3,530 +1%
Tomcat 7 (1.6) - 3,668 +6%

The 1% will be a combination of:
- Tomcat 7 uses version 3.6 of the Eclipse compiler while Tomcat 6 uses
3.3.1.
- the source code differences you can see in the .java files.
Hmm....

I tried forcing 1.5 as the source/target version for JspC -- I'm still over 65K with Tomcat 7.

I wonder if there's enough extra hidden code generated by use of generics...

Anyway, I guess the page owners will have to try to clean things up.
Is it possible that the source/target version is being ignored, e.g. for the Ant task form of JspC?

I ask as javac fails to compile the Java code generated by jasper as well for the same reason -- the _jspService method is too big. When I force 1.5 as the target and source version, however, javac compiles the generated Java code just fine.

When I try the same trick with my precompilation Ant script, however, ala

    <jasper2 uriroot="${docBaseLocation}" 
classpath="${wcWebAppClasspathAsString}"
             compile="true" outputDir="${outputDir}"
             classDebugInfo="true" smapSuppressed="${smapSuppressed}"
             compilerSourceVM="1.5" compilerTargetVM="1.5"
             validateXml="false" listErrors="true"
             verbose="${jspcVerbosityLevel}" jspFiles="${jspFileList}"/>

I still get the same failure, which seems rather odd. You'd think that JDT/EJC can't be generating that much larger code than javac.

--
Jess Holle


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

Reply via email to