Recently I've had some issues with my Android Studio - it was lagging, freezing, etc., which got me thinking about how I can improve the speed of my builds and Android Studio in general.

Here are the settings that I applied to my Gradle builds (global ones at ~/.gradle/gradle.properties), and so far they've been working like charm.

Below are the settings of my Gradle. My set up is M1 Max with 64 GB RAM.

What settings do you have to improve performance?