Announcement

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

    How can we avoid smartgwt default components in each compilation ??

    hi sanjiv/ isomorphic,

    Please tell me how can we avoid smartgwt components in each compilation which takes much time for compilation..

    ie,how can we compile the code of our app itself ??

    Please reply for this,my app is a large application,containing many jars.
    so it takes much delay in processing

    Any help will be appreciated..
    Thanks
    Vinu R
    Last edited by vinuriyer; 4 Jul 2011, 23:22.

    #2
    1. Remove unused locales
    2. Specify one user agent for testing only. Less permutation are done if you are aiming just one browser.

    an example here : http://blog.loxal.net/2009/03/how-to-speed-up-gwt-compiler-reduce.html

    hope it helps

    Comment


      #3
      hi jmichelgarcia,

      Thank u very much 4ur response..

      but i have already tried upon that,but it still takes 4-5 mins.

      this is my gwt file
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
      <!--
      
      -->
      <module>
          <!--  Combines all user facilities  -->
            <inherits name="com.google.gwt.user.User"/>
             <!-- Graphics module -->
            <inherits name='com.google.gwt.widgetideas.GWTCanvas'/>
            <!-- SmartGWT module -->
            <inherits name="com.smartgwt.SmartGwt"/>
            <!-- Theme-->
            
            <!-- Entry Point class -->
            <entry-point class="org.gtl.client.mds.MDSEntryPoint"/>
            <!-- For compilation speed up,only generating js for ie&mozilla -->
            <set-property name="user.agent" value="ie6"/>
              <extend-property values="ie8,gecko1_8" name="user.agent"/>
      
      </module>
      please tell me whats going wrong for delay in execution ???

      Comment


        #4
        I work with a huge project too, all my compilations and war packaging takes around 12 min. Before setting the user agent, and removing unused locales, it was taking around 20 min.

        Thus, in development mode, you don't need to compile everytime (only on deploy).

        Your xml file looks good. GWT permutations takes a lot of time, I would say its normal.

        Which GWT version are you using ?

        Comment


          #5
          hi

          My GWT version is GWT 2.1.1.
          As am not defined any locales in the gwt file ,so please tell me whats the issue...

          I guess by default all locales are loaded,is nt it ???
          so how can i prevent that ?

          Comment


            #6
            There is no issue. Large applications means a lot of code to handle, which means huge time of compilations.

            Your problem is linked to GWT, not to SmartGWT.

            And please read :

            http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_CompileOnePermutation

            http://bazoud.free.fr/post/2008/07/31/can-i-speed-up-the-gwt-compiler/

            Comment


              #7
              Thank u very much jmichelgarcia,

              is that ur name,actually ... :)

              Thanks dude.. i'll try it upon,and tell u

              Comment


                #8
                You'are welcome. hope it will help.

                Comment


                  #9
                  Originally posted by jmichelgarcia
                  This is an excellant article .. quite well now..

                  I also added a compiler option in gwt.properties file

                  Code:
                  gwt.compiler.args=-draftCompile
                  This also helps to speed up the execution..hope u can also use this to speed up..

                  Thanks for your help :)

                  My final gwt file is

                  Code:
                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd">
                  <!--
                  
                  -->
                  <module>
                      <!--  Combines all user facilities  -->
                        <inherits name="com.google.gwt.user.User"/>
                         <!-- Graphics module -->
                        <inherits name='com.google.gwt.widgetideas.GWTCanvas'/>
                        <!-- SmartGWT module -->
                        <inherits name="com.smartgwt.SmartGwt"/>
                        <!-- Entry Point class -->
                        <entry-point class="org.gtl.client.mds.MDSEntryPoint"/>
                        <!-- For compilation speed up,only generating js for mozilla -->
                        <set-property name="user.agent" value="gecko1_8"/>
                        <!-- setting the locale to en_UK only-->
                        <extend-property name="locale" values="en_UK"/>
                  
                  </module>
                  Last edited by vinuriyer; 5 Jul 2011, 22:17.

                  Comment


                    #10
                    If you are using the last version of GWT which is not my case, you can try to test this user agent :

                    <set-property name="user.agent" value="gecko"/>

                    According to this : http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml?r=3191
                    the "gecko" value is also supported

                    How long your compilation takes now ?

                    Comment


                      #11
                      Originally posted by jmichelgarcia
                      you can try to test this user agent :

                      <set-property name="user.agent" value="gecko"/>

                      According to this : http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml?r=3191
                      the "gecko" value is also supported
                      Which is not my case..am using GWT 2.1.

                      Originally posted by jmichelgarcia
                      How long your compilation takes now ?
                      Last time ,its 5mins ,now to 2mins.i added the locale statement and change my compiler options to draftCompile..

                      Thank u very much for your help :)

                      Comment


                        #12
                        Lets just specify for further questions, that the DraftCompile can achieve speeding up the compilation time, by not compressing the JavaScript code.

                        Im glad it helped vinuriyer.

                        Cheers

                        Comment


                          #13
                          So finally ,

                          We both reduced the compilation time by mixing up both solutions na ....

                          How long now for you ???

                          About draftCompile
                          Enable faster, but less-optimized, compilations
                          Last edited by vinuriyer; 6 Jul 2011, 01:44.

                          Comment


                            #14
                            I Saved more than 50% compiling time.

                            Comment


                              #15
                              Originally posted by jmichelgarcia
                              I work with a huge project too, all my compilations and war packaging takes around 12 min. Before setting the user agent, and removing unused locales, it was taking around 20 min.
                              So 6mins now, gud :)

                              so -draftCompile is doing more tricks too.. :)

                              Comment

                              Working...
                              X