You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2015/09/18 11:04:40 UTC

[2/2] tapestry-5 git commit: tweak JVM memory settings

tweak JVM memory settings


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/36301cc4
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/36301cc4
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/36301cc4

Branch: refs/heads/master
Commit: 36301cc4230431a1bceadd829e1a373cdd7315d5
Parents: 90273ab
Author: Jochen Kemnade <jo...@eddyson.de>
Authored: Fri Sep 18 11:03:52 2015 +0200
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Fri Sep 18 11:03:52 2015 +0200

----------------------------------------------------------------------
 build.gradle | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/36301cc4/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2c28632..c637b09 100755
--- a/build.gradle
+++ b/build.gradle
@@ -137,6 +137,10 @@ dependencies {
 }
 
 subprojects {
+
+    def jdkVersion = System.properties['java.version']
+    def specifyMaxPermSize = jdkVersion ==~ /1\.[67].+/
+    
     version = parent.version
 
     group = "org.apache.tapestry"
@@ -182,7 +186,10 @@ subprojects {
     compileTestGroovy {
         configure(groovyOptions.forkOptions) {
             memoryMaximumSize = '1g'
-            jvmArgs = ['-XX:MaxPermSize=512m', '-Xms512m', '-Xmx1g']
+            jvmArgs = ['-Xms512m', '-Xmx1g']
+            if (specifyMaxPermSize){
+              jvmArgs << '-XX:MaxPermSize=512m'
+            }
         }
     }
 
@@ -190,15 +197,19 @@ subprojects {
         useTestNG()
 
         options.suites("src/test/conf/testng.xml")
-
-        maxHeapSize "600M"
+        if (specifyMaxPermSize){
+          maxHeapSize "400M"
+          jvmArgs("-XX:MaxPermSize=200m")
+        }else{
+          maxHeapSize "600M"
+        }
 
         // Turn off live service reloading
 
         systemProperties["tapestry.service-reloading-enabled"] = "false"
         systemProperties["java.io.tmpdir"] = temporaryDir.absolutePath
 
-        jvmArgs("-XX:MaxPermSize=256m", "-Dfile.encoding=UTF-8")
+        jvmArgs("-Dfile.encoding=UTF-8")
 
         environment.LANG = 'en_US.UTF-8'