]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6115 SonarQube is slower whilst running with Java8 vs Java7
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 29 Jan 2015 09:08:24 +0000 (10:08 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 29 Jan 2015 09:08:24 +0000 (10:08 +0100)
sonar-application/src/main/java/org/sonar/application/App.java
sonar-application/src/main/java/org/sonar/application/DefaultSettings.java

index 9c027abebdf7c76008be6826534f933c6ded2f98..23ed8aae436015e1aa0ffa20bee6670cb771d674 100644 (file)
@@ -84,7 +84,7 @@ public class App implements Stoppable {
     if (StringUtils.isEmpty(props.value(DefaultSettings.CLUSTER_MASTER))) {
       JavaCommand webServer = new JavaCommand("web")
         .setWorkDir(homeDir)
-        .addJavaOptions("-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false")
+        .addJavaOptions(DefaultSettings.WEB_SERVER_FORCED_JVM_ARGS)
         .addJavaOptions(props.nonNullValue(DefaultSettings.WEB_JAVA_OPTS))
         .addJavaOptions(props.nonNullValue(DefaultSettings.WEB_JAVA_ADDITIONAL_OPTS))
         .setTempDir(tempDir.getAbsoluteFile())
index c905827db522ee7a72031e6e95a60286c8acd61c..bdd748fc701ffc4b98123de1dfa20772b0cf8cc9 100644 (file)
@@ -27,6 +27,10 @@ import java.util.Map;
 
 class DefaultSettings {
 
+  public static final String WEB_SERVER_FORCED_JVM_ARGS = "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false " +
+    // jruby is slow with java 8: https://jira.codehaus.org/browse/SONAR-6115
+    "-Djruby.compile.invokedynamic=false";
+
   private DefaultSettings() {
     // only static stuff
   }