tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Boynes <>
Subject Re: TldScanner + Config, was: Jasper Improvements
Date Thu, 27 Feb 2014 16:11:19 GMT
On Feb 27, 2014, at 4:09 AM, Konstantin Kolinko <> wrote:

> 2014-02-27 10:17 GMT+04:00 Jeremy Boynes <>:
>> I was thinking of supporting compile-on-start as a option where the initializer would
scan the war for JSP(x) files and initiate the compilation during startup. This was intended
for production use where use of JspC was not practical (e.g. because the actual version of
runtime is not known at pre-compilation time) but where taking a hit on access would be undesirable.
> -> "Background JSP compilation"
> Compiling can take notable time, so I think it wouldn't be good to
> delay application startup for that time.

I had in mind a production configuration where the JSPs are not expected to change between
deployments. IIRC, background compilation only works with JSPs that have already been hit
so there is still a compilation delay on first touch. This adds jitter to the latency timings
for an application. The idea was to avoid that by compiling everything during startup before
the application starts taking live traffic.

As you say, this would slow startup down but (assuming multiple hosts or parallel deployment)
would not impact user requests. A variation would be to kick off a background task so that
startup is not delayed.

>> I was thinking there to combine the TLD and JSP scans into one.
> Those are different scans.
> For TLDs you have to scan jar files.
> For JSPs you have to scan application resources.

TldScanner#scanResourcePaths has to scan all application resources under /WEB-INF as well.
For a MVC-style application where the JSPs are under /WEB-INF there can be substantial overlap.


View raw message