]> 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 15:54:00 +0000 (16:54 +0100)
sonar-application/src/main/java/org/sonar/application/App.java
sonar-application/src/main/java/org/sonar/application/DefaultSettings.java

index b70b2666de1f9bd02ecf18504d7d139654cb0492..5e40827c0a5492febdc6989dc23dbf14628489b8 100644 (file)
@@ -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())
index de9f68054fa87661a73adb3687de1d4f950bc140..b301879e39bd46ac9870e39a9470b286d43dabd4 100644 (file)
@@ -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
   }