Reputation: 832
I just want to ask "How can I speed up my Android Studio?". Though I do own:
Dell Inspiron 15R
12GB of RAM Core i7 (N5537),
these specs may look cool but still I am unable to working on Android Studio in Peace. As my Android Studio takes a lot of time when I reboot my machine and start the Android studio, its indexing process is way too long, the gradle build process is also way too laggy!
Even whenever I try to run my app on any device say on Virtual Device or any other real device it takes a lot of time, to switch between .java to .xml files is also way too long! For the most of times the Android Studio also stuck and hangs on different events especially on Gradle Build or refreshing the project and indexing the project files!
Upvotes: 3
Views: 4005
Reputation: 7661
To prevent the excessive "Indexing..." when launching Android Studio (with multiple projects open), you can switch on File -> "Power Save Mode". This makes it start up much faster. It also saves a lot of CPU in general, for example when typing code. You can switch it back on when you need the live inspections.
More info: https://jwhh.com/2013/06/07/android-studio-power-save-mode/
Upvotes: 0
Reputation: 462
Config + SSD made a huge difference!
Tweaking Paging Size, Clearing Temp Files and Cache do help but you wouldn't not have taken time to post here for saving a few seconds.
For marginal performance boost, We upgraded the machine and it's worth it.
Machine Specs: Alienware-i7 7820HK|16GB RAM|256GB PCie SSD|1TB HDD Software Config: Android Studio in SSD|SDK in HDD|Project Folder in HDD
Clock Time to load Android Studio: 9s Clock Time to create a new empty project: 20s till Gradle Build Finished Clock Time to open an empty project: Less than 5s till Gradle Build Finished Clock Time to open Android Studio; create a new empty project: 40s till Gradle Build Finished
If you could keep track and manage Android SDK properly, and predominantly use AS alone, we recommend an All-in-SSD approach.
Regards.
Upvotes: 1
Reputation: 832
For the above issue, I have done some work around to speed up my Android Studio. In other words the results are just boosted my Android Studio!
Add these Lines to that Opened File:
# custom Android Studio VM options, see http://tools.android.com/tech-docs/configuration
-Xms1024m
-Xmx4096m *****INCREASE THIS TO MAXIMUM OF YOUR RAM
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=1024m
-XX:+UseCompressedOops
-XX:+HeapDumpOnOutOfMemoryError
-Dfile.encoding=UTF-8
(You Should increase these values to the maximum of your machine resource, the above is for my own machine settings)
Thanks
Upvotes: 2
Reputation: 696
What SO are you using? I'm using the same version of Android Studio on an Acer with Windows 10, 8gb of RAM and i5-7200U, and I'm not facing these problems. Try to defrag your disk, or use a SSD, it helps a lot.
Upvotes: 0