You have a larger than average webapp (70 MB in WEB-INF / lib banks), but nothing is colossally large (I saw 800MB of military files)
There are several things that can cause a slowdown.
- Unpacking war into temp webapp directory
- Unpacking resource containers (
WEB-INF/lib/*.jar!/META-INF/resources/ ) into the temp WebApp directory - Scan Jar bytecode (for annotations and types declared in
@HandlesType annotations in javax.servlet.ServletContainerInitializer classes)
If your file system is slow, then any of the above can slow down.
Note: registering in the DEBUG Jetty magazine will inform you of the timing of each of them (even by canceling the synchronization time of the bytecode scan to a separate bank)
The bytecode scan rate is the most common place where startup time takes a hit.
Configuring <containerIncludeJarPattern> for "empty" is not recommended, which is necessary for servlets, JSP, Taglib to work.
containerIncludeJarPattern by default is only servlet banks / jsp / taglib. (which require scanning microseconds)
<webInfIncludeJarPattern> also should not be just "empty", it should at least include your WEB-INF/classes content (aka .*/classes/.* ). Think about tuning to check only those WEB-INF/lib banks that you need. (something like .*/lib/spring-.*\.jar$|.*/classes/.* )
The size in bytes of the classes in your WEB-INF/lib/*.jar and WEB-INF/classes does not actually matter. More important for synchronization is the number of files found (even non-classical files).
If you use resource banners ( WEB-INF/lib/*.jar!/META-INF/resources/ ), then this is a significant penalty / source of slow startup.
What can you do:
Start by looking at DEBUG magazines that tell you where things take their time.
Then examine with the quickstart Jetty functions if launch time is important (this has 2 parts, a build time component that scans and builds jetty-quickstart.xml , which is included in your war, and a run time module that looks for and uses jetty-quickstart.xml if found)
Finally, if you use resource banks ( WEB-INF/lib/*.jar!/META-INF/resources/ ), consider moving content from WEB-INF/lib to the usual places in your war during assembly ( package phase in maven). They are convenient, but have a bunch of side effects that you don't like. (also consider conflicting resolution of resources at runtime).