I did the following to resolve the Android Studio slowness.
Go to Android -> Preferences -> Build, Execution, Deployment -> Compiler
Check the Option –
Compile independent modules in parallel (may require larger heap size)
Set VM Options to :
-Xmx2048m -XX:MaxPermSize=512
Restart Android Studio.