Skip to content

Instantly share code, notes, and snippets.

@eapen
Created November 5, 2019 14:27
Show Gist options
  • Save eapen/cd1d6a2dd65b59fa28398db6c05d5076 to your computer and use it in GitHub Desktop.
Save eapen/cd1d6a2dd65b59fa28398db6c05d5076 to your computer and use it in GitHub Desktop.
# custom Android Studio VM options, see https://developer.android.com/studio/intro/studio-config.html
#-Dcom.sun.net.ssl.checkRevocation=false
#-Xms128m
#-Xmx4g
#-Xss512k
#-XX:MaxPermSize=1024m
# -XX:ReservedCodeCacheSize=200m
# -XX:+UseCompressedOop
#-Xms256m
#-Xmx2048m
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djna.nosys=true
-Djna.boot.library.path=
-da
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_studio_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_studio.hprof
# ###############################################
# custom settings from https://github.com/artem-zinnatullin/AndroidStudio-VM-Options/blob/master/studio.vmoptions
# ###############################################
# Runs JVM in Server mode with more optimizations and resources usage
# It may slow down the startup, but if you usually keep IDE running for few hours/days
# JVM may profile and optimize IDE better. Feel free to remove this flag.
-server
# Sets the initial size of the heap, default value is 256m
-Xms1G
# Max size of the memory allocation pool, default value is 1280m
-Xmx2G
# Sets the size of the allocated class metadata space that will trigger a GC the first time it is exceeded, default max value is 350m
-XX:MetaspaceSize=512m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment