views:

90

answers:

3

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.

+5  A: 

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.

Ashwin Prabhu
A: 

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.

Robert Munteanu
+3  A: 

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.

Nick Johnson
Cool. I read somewhere that ?GAE? scans all JARs I have on startup. (Maybe such claim was limited to JDO, but I'm not sure about that. Apparently that's irrelevant anyways.) Great news for me, thank you Nick!
Jaroslav Záruba