Xms
As in the JVM memory allocation is very, even if you have 16g,32g,64g memory, he only assigns you the maximum of hundreds of trillion of heap memory, will cause the project to become larger, long after the project run serious lag.
Optimization
Open your as installation directory, mine is
C:\Program files\android\android Studio\bin
Here's
And
It's the thing that has to be operated on. These two are the JVM's configuration files.
Refer to the following changes
-server-Xms2048m 初始分配内存-Xmx4096m 最大可用内存-XX:MaxPermSize=4096m-XX:ReservedCodeCacheSize=2048m-XX:+UseConcMarkSweepGC-XX:SoftRefLRUPolicyMSPerMB=200-Dsun.io.useCanonCaches=false-Djava.net.preferIPv4Stack=true-Djna.nosys=true-Djna.boot.library.path=-da
64
-Xms2048m-Xmx4096m-XX:MaxPermSize=4096m-XX:ReservedCodeCacheSize=2048m-XX:+UseConcMarkSweepGC-XX:SoftRefLRUPolicyMSPerMB=200-Dsun.io.useCanonCaches=false-Djava.net.preferIPv4Stack=true-Djna.nosys=true-Djna.boot.library.path=-da
I am 16G memory, XMS divided by 8,xmx divided by 4.
Xmx
You can enjoy the silky smooth.
Androidstudio Dayton Optimisation