esQmo_
esQmo_

Reputation: 1709

Android Studio slow performance

I've updated Android Studio to version 2.3 yesterday and since after I'm experiencing a slow performance, it was working fine before, though slow when gradle building, but now it taking 100% of processors resources.

What is the requirements for Android Studio to run smoothly?

My computer runs Windows 7 x64, i7 core, with 8 cores, 10Gb of RAM

Here is a screenshot

Upvotes: 3

Views: 10209

Answers (6)

In my case it was due to GPU. My computer has 2 GPUs one is intel's integrated GPU which is for ordinary works, and other one is NVIDIA GPU which is for Games and Other more sophisticated works.

Intel GPU was assigned to Android Studio by default, I changed it. Right Click on Desktop/ Nvidia Control Panel/ 3D settings/Manage 3D settings (from the right panel) Then Program settings/Choose NVIDIA for android studio

Upvotes: 0

Sean Blahovici
Sean Blahovici

Reputation: 5740

A very easy way to improve performance in Android Studio regardless of any machine is to disable a bunch of plugins.

Jake Wharton lists a few plugins that may be safe to disable. I personally saw a night and day improvement by following his directions.

Here is the link to the comment: https://www.reddit.com/r/androiddev/comments/7sxhig/android_studio_slower_when_using_kotlin/dt88pgn

Upvotes: 2

Mark Caveneau
Mark Caveneau

Reputation: 39

My solution is: WORK OFFLINE. It happened to me always, every time I tried to launch project. Finally (and by pure chance), I shut down my Antivirus and my Firewall and the performance increased 10 times.

Upvotes: 1

Smit Patel
Smit Patel

Reputation: 1194

To run Android environment on low configuration machine.

  1. Close the unnecessary web tabs in browser
  2. For Antivirus users, exclude the build folder which is auto generated
  3. Android studio have 1.2 GB default heap can decrease to 512 MB

Help > Edit custom VM options

studio.vmoptions
 -Xmx512m

Layouts performance will be speed up

  1. For Gradle one of the core component in Android studio Make sure like right now 3.0beta is latest one

Below tips can affect the code quality so please use with cautions:

  1. Studio contain Power safe Mode when turned on it will close background operations that lint , code completions and so on.

  2. You can run manually lint check when needed ./gradlew lint

  3. Most of are using Android emulators on average it consume 2 GB RAM so if possible use actual Android device these will reduce your resource load on your computer. Alternatively you can reduce the RAM of the emulator and it will automatically reduce the virtual memory consumption on your computer. you can find this in virtual device configuration and advance setting.

  4. Gradle offline mode is a feature for bandwidth limited users to disable the downloading of build dependencies. It will reduce the background operation that will help to increase the performance of Android studio.

  5. Android studio offers an optimization to compile multiple modules in parallel. On low RAM machines this feature will likely have a negative impact on the performance. You can disable it in the compiler settings dialog.

Upvotes: 4

Ruchi Tiwari
Ruchi Tiwari

Reputation: 1

Here you go with three easy steps to get Android Studio Fast :

Step 1 : Open gradle.properties file of your app and add in two lines as follows...

org.gradle.daemon=true  
org.gradle.parallel=true

Step 2 : File —> Settings —> Compiler ——> Command-line-Options (enter –offline) File —-> Settings —–> Compiler ——> ——> Enable Configure on Demand

Description : Click File visible at the left most corner of your Android Studio and then select Settings under it. In the Settings screen search for Compiler and here you should find Command-Line-Options, where you need to enter –offline. At the bottom most you will also have to enable the option Configure On Demand.

Step 3 : File —-> Settings —–> Gradle —–> Enable Offline work

Description : Under the Settings screen, search for Gradle and Enable Offline Work option in it.

Upvotes: 3

esQmo_
esQmo_

Reputation: 1709

The issue was solved by invalidating cache. Somebody, I don't remember where, suggested me that as it was an update from a lower version, I should try invalidating the cache then restart.

Here is the step:

FILE > INVALIDATE CACHES / RESTART

Now it runs smoothly like before.

Upvotes: 2

Related Questions