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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to