Compilation time doubles after upgrading to GWT 2.3

78 views
Skip to first unread message

Deepali

unread,
Dec 21, 2011, 4:21:36 AM12/21/11
to Google Web Toolkit
We are seeing a huge increase in the compilation time after upgrading
from GWT version 1.7 to 2.3. Given below is a comparison of the
compile time that we are seeing for one language and one browser.
It does not seem to be related to code splitting or IE9 support.

Has anyone else noticed such an increase with the version change? And
do you have any suggestions for reducing it?

(We are doing this compilation for our integrated test, UAT and
Production environments. So draftcompile or optimize 0 cannot be
used.)

GWT Ver Code Splitting Local workers Browser Time taken
2.3 Yes default IE 23 minutes 55 seconds
1.7 No default IE 10 minutes 25 seconds
2.3 No default IE 21 minutes 22 seconds
1.7 No 2 IE 10 minutes 14 seconds
2.3 No 2 IE 21 minutes 29 seconds
1.7 No 2 FF 9 minutes 38 seconds
2.3 No 2 FF 20 minutes 24 seconds
2.3 No 4 FF 20 minutes 18 seconds

Eric Clayberg (Google)

unread,
Dec 21, 2011, 12:20:16 PM12/21/11
to google-we...@googlegroups.com
What is the size of the resulting application in both cases?

Quite a few new compiler optimizations went into GWT between 1.7 and 2.3, so I would expect compilation time to increase quite a bit if you have all of those new optimization turned on.

There are compiler flags you can turn on to disable most of these optimizations and return to more 1.7-like behavior.

Ashton Thomas

unread,
Dec 21, 2011, 12:54:24 PM12/21/11
to google-we...@googlegroups.com
For reference:

try draftCompile and maybe only compile certain models with only certain permutation.

$ java -cp gwt-dev.jar com.google.gwt.dev.Compiler
Missing required argument 'module[s]'
Google Web Toolkit 2.4.0
Compiler [-logLevel level] [-workDir dir] [-gen dir] [-style style] [-ea] [-XdisableClassMetadata] [-XdisableCastChecking] [-validateOnly] [-draftCompile] [-optimize level] [-compileReport] [-strict] [-localWorkers count] [-war dir] [-deploy dir] [-extra dir] module[s] 

where 
  -logLevel               The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
  -workDir                The compiler's working directory for internal use (must be writeable; defaults to a system temp dir)
  -gen                    Debugging: causes normally-transient generated types to be saved in the specified directory
  -style                  Script output style: OBF[USCATED], PRETTY, or DETAILED (defaults to OBF)
  -ea                     Debugging: causes the compiled output to check assert statements
  -XdisableClassMetadata  EXPERIMENTAL: Disables some java.lang.Class methods (e.g. getName())
  -XdisableCastChecking   EXPERIMENTAL: Disables run-time checking of cast operations
  -validateOnly           Validate all source code, but do not compile
  -draftCompile           Enable faster, but less-optimized, compilations
  -optimize               Sets the optimization level used by the compiler.  0=none 9=maximum.
  -compileReport          Create a compile report that tells the Story of Your Compile
  -strict                 Only succeed if no input files have errors
  -localWorkers           The number of local workers to use when compiling permutations
  -war                    The directory into which deployable output files will be written (defaults to 'war')
  -deploy                 The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar)
  -extra                  The directory into which extra files, not intended for deployment, will be written
and 
  module[s]               Specifies the name(s) of the module(s) to compile

Ashton Thomas

unread,
Dec 21, 2011, 12:55:19 PM12/21/11
to google-we...@googlegroups.com
Also, the reference was for 2.4 not sure of exact changes for 2.3 but you can easily run the command 
Reply all
Reply to author
Forward
0 new messages