From: Simon Brandhof Date: Thu, 29 Jan 2015 09:08:24 +0000 (+0100) Subject: SONAR-6115 SonarQube is slower whilst running with Java8 vs Java7 X-Git-Tag: latest-silver-master-#65~15^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1a967d04eae33998087b7ee09068c9fb05a8696a;p=sonarqube.git SONAR-6115 SonarQube is slower whilst running with Java8 vs Java7 --- diff --git a/sonar-application/src/main/java/org/sonar/application/App.java b/sonar-application/src/main/java/org/sonar/application/App.java index b70b2666de1..5e40827c0a5 100644 --- a/sonar-application/src/main/java/org/sonar/application/App.java +++ b/sonar-application/src/main/java/org/sonar/application/App.java @@ -85,7 +85,7 @@ public class App implements Stoppable { if (StringUtils.isBlank(props.value(ProcessConstants.CLUSTER_MASTER_HOST))) { 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(ProcessConstants.WEB_JAVA_OPTS)) .addJavaOptions(props.nonNullValue(ProcessConstants.WEB_JAVA_ADDITIONAL_OPTS)) .setTempDir(tempDir.getAbsoluteFile()) diff --git a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java index de9f68054fa..b301879e39b 100644 --- a/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java +++ b/sonar-application/src/main/java/org/sonar/application/DefaultSettings.java @@ -28,6 +28,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 }