简体   繁体   中英

Compile one permutation per time?

Is there any way to set gwt compiler so that each permutation is compiled until finish before proceeding with next permutation?

Currently, I am already running out of heap memory even though Xmx already set to 2gb on 64bits system. I don't mind it being slow as long as it able to finish compiling all the permutations

Set localWorkers to 1 (or maybe even better: your number of cores minus 1).

We're using maven and in the default profile we build a FastCompiledGuvnor module and in the full profile we do the real Guvnor module:

  <plugin>
    <!--use -Dgwt.compiler.skip=true to skip GWT compiler-->
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.1.0-1</version>
    <configuration>
      <!-- The default profile needs to be fast, so we only build 1 permutation { -->
      <module>org.drools.guvnor.FastCompiledGuvnor</module>
      <draftCompile>true</draftCompile>
      <!-- } -->
      <runTarget>org.drools.guvnor.Guvnor/Guvnor.html</runTarget>
      <compileSourcesArtifacts>
        <compileSourcesArtifact>org.drools:drools-factconstraint</compileSourcesArtifact>
        <compileSourcesArtifact>org.drools:drools-ide-common</compileSourcesArtifact>
      </compileSourcesArtifacts>
      <gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath><!-- The GWT compiler must the correct JDT version -->
      <localWorkers>2</localWorkers><!-- Using all workers can temporarily hang the mouse and isn't much faster -->
      <extraJvmArgs>-Xmx512m</extraJvmArgs>
    </configuration>
    ...
  </plugin>

    ... profile ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <configuration>
          <!-- Build all GWT permutations and optimize them -->
          <module>org.drools.guvnor.Guvnor</module>
          <draftCompile>false</draftCompile>
        </configuration>
      </plugin>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM