optimizing Android Studio for low RAMed machines (part one: 1-5)

optimizing Android Studio for low RAMed machines (part one: 1-5)

Have you been here:

  • A PC or Laptop with Small/little RAM!(Memory-constrained computers!) Despite all of that you still want to learn to code and be an Android Developer or you are currently an android developer!

All in all, we still want to be android developers despite not being able to upgrade our hardware just yet because of financial constraints.

We may have been here at some point. If you have not, the ancestors of Android Development have been smiling at you. I will cover how to improve Android Studio performance on hardware constrained devices!

When it comes to application development, Android Studio has many of features(I recently discovered some after many years of Android Development- post for another day). You may not even be aware of some of them. All these features place an extra resource need on the host operating system for them to work. This can create a frustration when you want it to actually work for you and not slow you down.

In this post( Part of a series ), I look at the first 5 things you could do to make your development experience a bit smoother.

1. Exclude project build folders from scanning by your Anti-Virus.

If you use an antivirus, every build file generated by the IDE will trigger real-time virus scanning. The challenge with virus scanning is that it competes for system resources. To fix this: a. Go to your anti-virus scanner configuration. b. Select your project's build output folders(depends on where you have placed them -but ordinarily in the build folder in your project directory.) c. Exclude them from scanning. Word of Caution: Don't add any strange libraries or projects from your friends in the internet.

2. Close those Apps

Close any unnecessary applications that are not needed when you are coding. Those many web browser tabs that you have opened will compete with android studio for the already limited RAM resource available in your machine.

manyTabs.png the many tabs opened

3. Default AS Heap Size.

Android Studio has a default largest Java heap size of 1.2 gigabytes. If your computer has low RAM, you should reduce the default heap size to something like 512 megabytes. You can set these values here: Help > Edit Custom VM options

Caution: Reducing this value, you are reducing the amount of computer resources available for Android Studio features to make use of.

4. Update Gradle:

Always update to the latest versions of Gradle and Android plugin for Gradle. This will ensure the latest performance optimizations are available to your project. I have a written a post about optimizing for Performance with Gradle in Android Studio *Caution:* If you work with a team, better have discussions about versions of Gradle you will be using.

5. Enable Gradle offline mode.

This is a feature for users with bandwidth-limited users to disable downloading of build dependencies.

This helps improve performance on low RAM machines. Accessing the internet can be an expensive affair for your low RAM machine. Background processing happens as it triggers builds. You can reduce these tasks by enabling offline mode within Android Studio.

Did this article give you some ideas on how to set-up Android Studio for your low RAM laptop? Do you have extra ideas based on what works for you to make the development experience smoother? Better yet i did not help at all and this felt like click bait:) Let me know in the comment section.

FYI: This is part of a series that i am covering click the series to access all the articles. Subscribe to get a notification of when i publish the next articles.