Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT & GWT compile time

    This might be a bit off-topic, but I was wondering what kind of setup gives a fast compile time with SmartGWT & GWT.
    It's almost christmas ;-)

    Should I buy...
    - motherboard: dual processor or just single
    - processor: Opteron, Phenom, Xeon or Core i7

    1. Will a second processor have any impact?
    2. Is a processor with more cores better?


    As a small test I took the showcase from SmartGWT-EE (http://smartclient.com/releases/smartgwtee-2.1/ee-eval/smartgwtee-2.1.zip)
    and compiled it on my laptop.

    The build took 1 min 45 secs on my laptop with Intel Core2 @1.6 GHz.

    3. Can you beat this and post your system specs?

    Thnx !

    #2
    I have two Quad Core CPUs and compiling only appears to use a single thread of one core. What I mean by this is that the CPUs are Intel 5500 and they support hyperthreading so I get 16 cores show in Task Manager or Process Explorer. I have a RAID 10 4 disk IO and 22GB Ram with a few Gb set for eclipse and compiling is not fast.

    Comment


      #3
      There are several things you can do to speed up compilation. However bear in mind that during development you should primarily be running in hosted mode which doesn't run the actual compilation and it's much faster.

      To speed up compilation during development only, add properties to your module file to limit the compilation to the permutation of the browser you're doing your testing in, and a single default locale.

      Eg :
      <!-- for FF only -->
      <set-property name="user.agent" value="gecko1_8"/>

      Currently supported values are ie6,gecko,gecko1_8,safari,opera

      <!-- for the "en" locale only -->

      <set-property name="locale" value="en"/>

      Other optimizations include
      1) passing the right memory values (-Xms, -Xmx) to the Java process running the GWT compiler.

      2) Using the -localWorkers parameter to enable multi-thread compilation.

      See this excellent article on how to pick the right memory and localWorkers setting depending on your machine hardware.

      3) using ant "parallel" tasks to compile multiple modules if your project involves multiple GWT entry points. Read this article.

      Other options (not verified by me) are listed below. If anyone has used these and has some numbers please report them.

      4) -draftCompile : enables faster, but less-optimized, compilations

      5) Development only -XdisableAggressiveOptimization flag to GWTCompiler and GWTShell to disable method inlining.

      6) Some users on the GWT forum have reported that passing the JVM arg -XX:AllocatePrefetchLines=4 results in a performance improvement

      If anyone else has any tips or experience using these flags please share your experience.

      Thanks,
      Sanjiv
      Last edited by sjivan; 6 Dec 2010, 06:42.

      Comment


        #4
        I'm curious to know what people's average compile times are when developing.

        From the time I hit 'refresh' in the the browser on a new run of the GWT development server, it takes roughly 20-30 seconds. Incremental changes are not as bad of course, as long as I'm not editing the server code and need to restart the server.

        I'm using a GWT 2.1.1, Java 1.6.0.22, Ubuntu 10.04 32bit, on a core i5-540 (2.5ghz dual core (faux quad hyperthreading)).

        Also, the browser/locale tweaks did not work for me. I also tried adding the following to the VM args in my run config in eclipse but no speedup. -Dgwt-plugin.localWorkers=2 -Dgwt-plugin.extraJvmArgs=-Xmx512m

        What's your compile time like and are there any updated tweaks? If possible, please post a complete working example of the module definition and describe how you apply any VM args.

        Comment

        Working...
        X