简体   繁体   English

每次编译一个排列?

[英]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? 有没有办法设置gwt compiler以便在继续下一个排列之前编译每个排列直到完成?

Currently, I am already running out of heap memory even though Xmx already set to 2gb on 64bits system. 目前,即使Xmx已经在64位系统上设置为2gb,我已经用尽了堆内存。 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). localWorkers设置为1 (或者甚至更好:核心数减去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: 我们正在使用maven,在默认配置文件中我们构建了一个FastCompiledGuvnor模块,在完整的配置文件中我们使用了真正的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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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