Sunday, 26 March 2017

Android Studio 2.3 - Speed up startup loading time

I updated my Android Studio 2.1.3 to Android Studio 2.3 on my Windows 10 OS System.

My computer had a configuration of 8GB RAM, 4GB Nvidia 920m GPU and 5th Gen i5 Processor. But when starting the android studio it was really very slow and was just not enough to work on it.

It took me 15-20 mins to start and build the initial gradle in the android studio.

So I tried to make some changes and updates in the system to make the system work faster and lower the startup time for the Android Studio 2.3.


Here are the changes and updates that I made in my computer:


1. Enable IVT for Intel Processor
This starts the virtualization of the system to make the PC process faster.

To do this restart your PC and go to the BIOS setting at the startup and enable the IVT/Virtualisation for Intel Processor.

2. Increase Virtual Memory to 20GB

Go to Computer -> Right Click and select Properties -> In Left side select Advanced System Settings

In Advanced -> Performance -> Settings




3. Install HAXM Intel 86x Emulator
Download link: https://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager/

4. Click Windows+R and Go to services.msc
Select Windows Search and Superfetch
Go to Startup type and select disabled
And stop the services

5. Go to settings -> System -> Notifications -> Get tips, tricks about Windows -> turn Off



Default setting of Windows 10 will use about >90% of your disk which will make your building process much more slower. You could decrease it to <12% by simply turning off "Show Me About Windows".

6. Go to gradle.properties in the Android Project and set

org.gradle.jvmargs=-Xmx2048m



7. Enable offline Gradle compiler to prevent the update checks

Go to File -> Settings.

And open the 'Build,Execution,Deployment',Then open the 'Build Tools' -> 'Gradle'.
Then check "Offline work" on the right.


8. Also go to compiler and set the Command line options to --> 

--parallel --offline


After doing this settings Android Studio 2.3 went 2.5x faster. Its starting on a reboot which was initially 15-20 mins, was lowered to 6-8 mins.

As a best performance in Android Studio restart which took almost 10 mins was lowered to 3 mins.

2 comments: