Does Eclipse upload 3rd-party GWT libraries to GAE

2019-06-26 04:34发布

One of the tips for lowering your app's cold-start latency is to use/upload as few JARs as possible. I'm wondering what can I do to prevent 3rd-party GWT libraries (like gwtquery.jar etc.) from being uploaded to GAE? (Once the app gets compiled these become useless, so it would be quite unfortunate should they attribute to the latency.)

It would be great if it was possible to filter particular files while still using the Eclipse GWT plugin.

And how can I tell whether they get uploaded or not? Console output does not seem to be too helpful in this.

3条回答
够拽才男人
2楼-- · 2019-06-26 04:57

Only those jars under WEB-INF/lib will be uploaded to GAE. You can prevent GWT jars from being uploaded by not placing them under WEB-INF/lib, rather by externally linking to them in your project build path.

查看更多
爷的心禁止访问
3楼-- · 2019-06-26 04:58

If using Maven, you should declare your dependencies with the provided scope. This way they will be present in the compilation classpath, but not included in the WAR file.

查看更多
我想做一个坏孩纸
4楼-- · 2019-06-26 05:13

Cold-start latency is determined by the time it takes to load all the classes needed to handle the request. If you upload a JAR file, but nothing references it, it won't be loaded, and thus won't affect your cold-start latency.

查看更多
登录 后发表回答