6

Android Studio seems to take more memory than any other application. Java binary adds to it and it just slows things down after a while. Usually a restart of android studio fixes this, but, i need to do this every few hours. At the time of writing this, Android Studio and Java together take about 2.5GB RAM. I used to think eclipse was bad :)

A snapshot of memory usage

I have 10GB RAM and still find it slow to use, at times occassionaly hangs. I wonder if others are facing the same problem too?

Android Studio Version:

Android Studio Version

Veeru
  • 4,936
  • 2
  • 43
  • 61
  • Same here.. especially bad when Gradles doing it's thing. I've got my laptop maxed out at 8GB of memory but it still crawls when compiling. – Chris Nevill Jan 19 '15 at 12:10
  • Tell me about it! - I hope there is a solution to it. I just started A.Studio and within seconds it started using close to 2GB – Veeru Jan 20 '15 at 02:46
  • Me too, it's so frustrating to the point I am wondering why everyone makes such a fuss about Android Studio. I work on a work provided laptop which tops out at 4gb (I'm going to have to ask for an upgrade). On balance it seems to take more away from the development process than it gives. I also worry that this question will eventually come victim to the moderation police who will deem it ' not a proper question' (roll eyes). Rather than do that, I hope someone is able to post some tips for speeding up Android Studio on Windows. – Andrew S Jan 27 '15 at 00:37
  • Lets only hope someone can come up with a solution to this. AS, hits high memory usage in the first few seconds of usage. WIth 10GB ram, i look at restarts every now and the, at 4Gb, god save you brother! – Veeru Jan 27 '15 at 07:11
  • 1
    possible duplicate of [Android studio takes too much memory](http://stackoverflow.com/questions/27176353/android-studio-takes-too-much-memory) – Soma May 06 '15 at 11:20
  • 1
    I flagged this question as duplicate, even if it's older, because it has no accepted answer. There are different, supposedly useful, answers on both threads! – Soma May 06 '15 at 11:25

2 Answers2

0

The problem is that Android Studio which is based on IntelliJ idea use java and garbadg collection does do correctly so used memory can grow up.

In linx systems you can use

jcmp <pid> GC.run 

this command run garbadg collector and solve idea problem.

Other problem is that gradle instances after running are still alive and you should kill them manually. Potentially they may use more than 1 GB of memory.

In linux distribution you can use

kill -9 <pid>

to find pids you can use jconsol which can run garbage collector it self and show running java processes or use

ps -A | grep java
Vahid Haratian
  • 708
  • 2
  • 6
  • 23
0

In my case disabling some plugins helped a lot.

You can disable some of them by going to File | Settings |Plugins and disable the following:

enter image description here

Jorge Casariego
  • 21,948
  • 6
  • 90
  • 97