tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Arvesen" <a...@elysiumpartners.com>
Subject jspc -compiler switch
Date Wed, 10 Apr 2002 19:11:58 GMT
Hello Dev,

	<flame off> 
	I've read the posting guidelines for the list, the submission guidelines for jakarta,  and
the archives for the tomcat-dev.  I'm still not quite sure of sending in a diff for my change,
etc.  Please be kind :)
	</flame off>


We've been using the jspc code shipped with tomcat for a few months now.  Over time, our code
base has grown large enough for it to be irritating to recompile from scratch each time (5
minutes on my old PII at home).  One of the long processes was that jspc would recompile every
jsp file each time.
	I grepped through the code and saw that Compiler was subclassable (in particular, the isOutDated
method is what I was interested in), but that JspC was hard coded to always call the CommandLineCompiler
class.  To get around this, I've done two things:

1)  added a -compiler switch to JspC that takes a class name as an argument 
2)  written a very simple NewerCompiler class that compares the last modified date (as reported
by java.io.File) for the .jsp file and the resultant .java file.

Results have been excellent:  an incremental compile will now take 40 seconds on a machine
that takes 3 minutes 4 seconds for a full compile.  The new class does not try to anything
sophisticated about dependency checking, etc.  At worst, we just do a clean install to force
all the .jsps to recompile.

I read through the tomcat mailing lists and didn't see that anyone had addressed this (that
is, plugging in a new compiler into jspc).  I don't want to duplicate anything and I also
don't want to bloat the code base with non-needed features :)  What does the mailing list
think?  Is this is useful mod?


Thanks for your time,
Alan

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message