tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee <g...@edamame.stinky.com>
Subject Re: Java code generation tomcat JSP's
Date Thu, 21 Sep 2000 20:47:07 GMT
I'm all for making the generated code cleaner, but I don't think
anyone is working on that specifically right now.  I'm sure any work
you do (e.g. putting more code into the superclass or helper classes,
or using object pools) would be greatly appreciated.  (Note
org.apache.tomcat.util.SimplePool for a simple thread-safe object pool
base class.)

One comment:

> 3. is there a way to make Tomcat not emit the comments into the generated
> java files?  I went thru and stripped out the comments from a couple of the
> files, and they dropped about 130K out of 440K.  I know, the comments don't
> affect code size, and the JSP's don't recompile all the time, so this should
> not affect production speed at all, but I do have to recompile the JSPs tons
> of times a day, and anything I can to to shave off a second or two makes me
> happy.

The comments are useful for debugging, at least theoretically.  I
wrote a patch that scans the generated Java source at runtime to find
out the line in the .jsp that the error occured, but I don't think I
ever checked it in because I didn't get anyone to test it with
non-javac-1.2 compilers :-(

Thus, if you do want to strip comments, make it a runtime option set
in server.xml somewhere.

-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

Mime
View raw message