Skip to content

Instantly share code, notes, and snippets.

@williamyyu
Last active May 15, 2022 21:17
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save williamyyu/d4460c1c41fd759a080e189054ba91da to your computer and use it in GitHub Desktop.
Save williamyyu/d4460c1c41fd759a080e189054ba91da to your computer and use it in GitHub Desktop.
Android Studio VM Options
# custom Android Studio VM options, see https://developer.android.com/studio/intro/studio-config.html
# Initial stack memory size, affects idea start speed
-Xms4G
# Maximum heap memory size that Android Studio can use, reduces the garbage collection frequency.
-Xmx8G
# Initial Permanent generation
-XX:PermSize=2048M
# Maximum Permanent generation
-XX:MaxPermSize=4096M
# Maximum compiller buffer when JIT java compiler compling
-XX:ReservedCodeCacheSize=2048M
@iuriimattos
Copy link

iuriimattos commented Mar 5, 2020

thanks for share, working in intellij community 2020.2

@iuriimattos
Copy link

iuriimattos commented Jun 20, 2021

credits: https://gist.github.com/P7h/4388881#gistcomment-3600538

my custom IntelliJ 2021.1 IDEA VM options

-server
-XX:MetaspaceSize=128M
-XX:MaxMetaspaceSize=512m
-XX:+AlwaysPreTouch
-Xms128m
-Xmx1512m
-XX:ReservedCodeCacheSize=512m
-XX:+UseG1GC
-XX:+UseStringDeduplication
-XX:AutoBoxCacheMax=20000
-ea
-Dsun.io.useCanonCaches=false
-Dsun.awt.keepWorkingSetOnMinimize=true
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djsse.enablesSNIExtension=false
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dfile.encoding=UTF-8
-Dhidpi=true
-Dsun.java2d.uiScale.enabled=false
-Dide.ui.scale=1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment