diff options
author | Sam Gilbert <sjgilbert@google.com> | 2019-06-14 14:58:35 -0400 |
---|---|---|
committer | Sam Gilbert <sjgilbert@google.com> | 2019-06-14 15:53:33 -0400 |
commit | c547ea8794f44d2de00cb399df8800d790b3b94f (patch) | |
tree | a469c9a4137e06ae8dcb7ceda8981e6fdf3b9343 | |
parent | 2099b15c3f88bbd7a4ec2875fe18762c39c59468 (diff) | |
download | support-c547ea8794f44d2de00cb399df8800d790b3b94f.tar.gz |
Fixing jvm heap size manually pending resolution of b/135183535
The first attempt at this (aosp/983383) contained a typo causing
failure, and needed to be reverted. This fixes the mistakes.
Test: Ran ./studiow on Mac and Linux successfully
Change-Id: If4047e79cee6ed7e70e0459f9982cbd4b20319e8
-rwxr-xr-x | studiow | 11 | ||||
-rwxr-xr-x | ui/studiow | 11 |
2 files changed, 22 insertions, 0 deletions
@@ -111,6 +111,16 @@ function checkLicenseAgreement() { fi } +# Temporary fix. Remove this after fixing b/135183535 +function updateJvmHeapSize() { + if [ "${osName}" == "mac" ]; then + sed -i '' 's/-Xmx.*/-Xmx8g/' "$(findStudioMacAppPath)/Contents/bin/studio.vmoptions" + else + sed -i 's/-Xmx.*/-Xmx8g/' "${studioUnzippedPath}/android-studio/bin/studio64.vmoptions" + sed -i 's/-Xmx.*/-Xmx4g/' "${studioUnzippedPath}/android-studio/bin/studio.vmoptions" + fi +} + function updateStudio() { # skip if already up-to-date if stat "${studioUnzippedPath}" >/dev/null 2>/dev/null; then @@ -167,6 +177,7 @@ function runStudioMac() { } function runStudio() { + updateJvmHeapSize if [ "${osName}" == "mac" ]; then runStudioMac else diff --git a/ui/studiow b/ui/studiow index a0b0daf2f34..a088ce6d325 100755 --- a/ui/studiow +++ b/ui/studiow @@ -115,6 +115,16 @@ function checkLicenseAgreement() { fi } +# Temporary fix. Remove this after fixing b/135183535 +function updateJvmHeapSize() { + if [ "${osName}" == "mac" ]; then + sed -i '' 's/-Xmx.*/-Xmx8g/' "$(findStudioMacAppPath)/Contents/bin/studio.vmoptions" + else + sed -i 's/-Xmx.*/-Xmx8g/' "${studioUnzippedPath}/android-studio/bin/studio64.vmoptions" + sed -i 's/-Xmx.*/-Xmx4g/' "${studioUnzippedPath}/android-studio/bin/studio.vmoptions" + fi +} + function updateStudio() { # skip if already up-to-date if stat "${studioUnzippedPath}" >/dev/null 2>/dev/null; then @@ -202,6 +212,7 @@ function runStudioMac() { } function runStudio() { + updateJvmHeapSize if [ "${osName}" == "mac" ]; then runStudioMac else |