Configure Eclipse to pre-bundle App Engine classes

2019-03-10 23:27发布

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 using the following steps:

  1. Configure Eclipse to bundle classes produced during compilation into a single JAR file.
  2. Configure Eclipse to upload this single JAR file instead of hundreds (or thousands) of separate Java classes during App Engine deployment.

He argues that during instance warm up, since the instance need to load only a single bundled JAR file instead of thousands of separate classes, the warm up would be significantly faster. Any thoughts or opinions about this?

I would definitely like to try it by myself, but I don't have enough Eclipse-mojo to know how to configure such steps. Does anyone know how to configure Eclipse or the Google Plugin for Eclipse to do the steps outlined above? (And have the deployed apps successfully runs in App Engine, of course)

Thank You,

7条回答
冷血范
2楼-- · 2019-03-11 00:17

Note that as of version 1.7.4:

You can now package all the WEB-INF/classes/* classes into jar files. This can be done via the new

--enable_jar_classes option in the appcfg tools. By default, this option is not set.

http://code.google.com/p/googleappengine/wiki/SdkForJavaReleaseNotes

查看更多
登录 后发表回答