After some discussion with a colleague from another company that also uses App Engine, he told me that he managed to cut down his app warm up time from ~15 seconds to ~5 seconds
As stated in an earlier answer, the App Engine SDK supports packaging WEB-INF/classes
into a jar file, which will end up in WEB-INF/lib/_ah_webinf_classes-0000.jar
. You can activate this
using the appcfg tool with the option --enable_jar_classes
.
using the Google Plugin for Eclipse by configuring the properties of either your WAR or EAR project: Project properties > Google App Engine > Deployment > "Package WEB-INF/classes as a jar"
For me, on App Engine 1.9.4, this resulted in only a minor improvement in instance spin-up (about 5-10 %, if any).
Note that this will package all files in WEB-INF/classes (not only .class ones). Following the change, I got an error message during instantiation about not being able to read the logging.properties file anymore; probably because the new jar file hasn't been read at that time:
Unable to read the java.util.logging configuration file, WEB-INF/classes/logging.properties
As a workaround, I changed the path in appengine-web.xml to WEB-INF/logging.properties
and configured the maven-war-plugin to copy the file to that location:
lib
WEB-INF/lib
src/main/resources
logging.properties
WEB-INF