Compile one permutation at a time?

Is there a way to make gwt compilersure that each permutation is compiled to completion before continuing with the next permutation?

Currently, I have already run out of heap memory, although it is Xmxalready installed on 2gb on a 64-bit system. I do not mind that it is slow if it is able to complete the compilation of all permutations

+3
source share
1 answer

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

We use maven and in the default profile we create a module FastCompiledGuvnor, and in the full profile we make a real module Guvnor:

  <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>
+2
source

Source: https://habr.com/ru/post/1791440/


All Articles