Android Studio is slow (how to speed up)? -


i upgraded eclipse android studio , i'm not liking experience. i'm comparing them both on windows 7 64 bit ultimate 16gb of ram , intel i7 4770 running nvidia geforce 780 latest nvidia drivers if matters , i'm running latest jdk , latest android studio.

the android studio slow in building project can live it's extremely resource intensive , slows down pc crawl.

whenever i'm building or running in as, pc seems become extremely sluggish. causes flickering of screen , blanking second monitor if click on "gradle build running" spinner find odd. ram usage shoots ~3gb find excessive doing nothing (this when it's idle after few builds).

in addition, panels @ bottom of keep jumping around horrible user experience (moves android messages version control or else on ad-hoc basis depending on what's happening very, annoying).

what know basically:

1) how make android studio run better? may doing wrong or missing updates i'm not aware of , i'm sure others have noticed these behaviors , have found solutions it.

2) how "pin" bottom panels don't jump around , instead, let me, user, navigate them when wish instead of automatically switching them?

many , apologies again if it's not correct place these questions.

edit 1 more comments:

  • i'm using latest stable build of today. build android studio 1.2.2 build # ai-141.1980579, build on june 3, 2015
  • the behavior happens when using either java 7 or 8. doesn't appear related version of java.
  • i not using presentation mode. vanilla view.
  • doing changes build configuration (thanks @blackbelt , answer) appears have helped build other problems sluggishness , general user experience remain.

to sum up

1) in androidstudio's settings > compile enable checkbox named compile independent modules in parallel.

2) under help> edit custom vmoptions have:

-xms1024m  -xmx4096m # <------ increase of ram  -xx:maxpermsize=1024m  -xx:reservedcodecachesize=440m  -xx:+usecompressedoops  -xx:+heapdumponoutofmemoryerror  -dfile.encoding=utf-8 

p.s. people note, instead of vm options, it's better combine can overriden combining lines 1 line single command in gradle.properties, :

org.gradle.jvmargs=-xms1024m -xmx4096m ......

3) have old dual core 4gb ram, running ubuntu. qs command line option have --offline (which specifies build should operate without accessing network resources). enabled remaining checkboxes , it's running ok:

  • make project automatically

  • use in-process building configure on demand

  • check androidstudio's settings, under compile checkbox compile independent modules in parallel enabled.

under vmoptions have

-xmx2048m -xx:maxpermsize=1024 

i have old dual core 4gb ram, running ubuntu. qs commandline option have --offline , specifies build should operate without accessing network resources. enabled remaining checkboxes:

  1. make project automatically
  2. use in-process building
  3. configure on demand

    and running ok

edit

it possible provide additional options through studio.vmoptions located @ (just replace x.x version):

  • windows: go %userprofile%\.androidstudiox.x\studio.exe.vmoptions (or studio64.exe.vmoptions)

  • mac: ~/library/preferences/.androidstudiox.x/studio.vmoptions

  • linux: ~/.androidstudiox.x/studio.vmoptions (and/or studio64.vmoptions)

increasing value of -xmx should lot. e.g

-xms1024m -xmx4096m -xx:maxpermsize=1024m -xx:reservedcodecachesize=256m -xx:+usecompressedoops 

will assign 4g max heap, initial value of 1g

edit:

on windows defaults stored c:\program files\android\android studio\bin\*.vmoptions. ide allows tweak values through help->edit custom vm options (thanls @code-read pointing out)


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -