How to improve speed of Android Studio on a legacy computer

Android Studio is one of the best IDEs for Android apps development, but with legacy computers, it is very slow. To run it on a Dell Vostro 3546, here’s what I had to do.

Upgrade hardware

Minimum RAM required is 8 gb. The laptop came with 4 gb DDR3 1600 Mhz RAM which was slow, but inadquate. First step was to upgrade this to 8 gb DDR3 1600 Mhz RAM. Note that since this is a very old model, support is an issue.

Minimum 500 gb SATA SSD. The laptop had a 1 TB 5400 rpm Seagate hard disk. The best option is to upgrade this to a 500 gb SATA solid state drive. I chose Crucial MX500.

To find the best upgrade options for your device, visit https://www.crucial.in.

Disable all unwanted plugins

Go to Settings -> Plugins and disable the following plugins. You can enable them if you need them in future:

  • Android APK Support
  • Android Games
  • Android NDK
  • App Links Assistant
  • Copyright
  • Coverage
  • CVS Integeration
  • Editor Config
  • Fabric for Android Studio
  • Firebase (App Indexing, Services, Testing)
  • Github
  • Google (Cloud Tools Core, Cloud Tools for Android, Developer Samples, Login, Services)
  • Markdown Support
  • Mercurial integration
  • hg4idea
  • Settings repository
  • Subversion integration
  • Task management
  • Test recorder
  • TestNG-J
  • YAML

Insert values in the global gradle.properties

Create and insert the following values in the global gradle.properties file at ~/.gradle/gradle.properties. These will be used for every project created:

android.useAndroidX=true
kotlin.code.style=official
android.nonTransitiveRClass=true
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.unsafe.configuration-cache=true
org.gradle.caching=true
org.gradle.jetifier=false
android.suppressUnsupportedCompileSdk=33

Enable Offline Work

Enable offline work if you do not want to gradle files to be downloaded for each project when it is opened. Note that this need not be done unless Android Studio is unusable. To enable offline work, go to View -> Tool Windows -> Gradle and then click on the icon Toggle Offline Mode. Again clicking on the icon will off Offline Mode.

Ignore thumbs.db

Go to File -> Settings -> Editor -> File Types and in Field of Ignore files and Folders add Thumbs.db. It also can speed up Android Studio.

Use a physical device instead of the Android Studio emulator

If you use a physical device to run apps during development, Android Studio works like a charm. The disadvantage of versions below 11 is that a USB cable needs to be connected to the computer, whereas with Android 11, wireless connection can be used. Need to upgrade old Moto g5s plus to Android 11.

Clear the Cache of Android Studio

To clear the cache do File -> Invalidate Cache and Restart.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s