Android Studio Hardware (Gradle Build) in 2024

Introduction

If you use Android Studio in your work, then it is highly likely that sooner or later you will ask yourself the question – what can be “upgraded” in the hardware to improve performance and what to expect from this? If you look at the official recommendations (https://developer.android.com/studio/install), then they are rather meager and do not bring much clarity. On Habr there was already a rather interesting article on this topic with detailed analyses of “what influences what” – https://habr.com/ru/companies/cian/articles/715640/. Here I will try to supplement it a little with some more tests.

Motivation

It all started with the fact that, gradually updating the computer, I received more and more performance, until at one “wonderful moment” it stopped working. Namely, when switching from 14600KF to 14700KF – there was an increase, but not so significant.

What and how I measure

Several years ago, there was an interesting project on github to collect statistics on the performance of various systems when building a project in Android Studio – https://github.com/yozhik/AndroidStudioBenchmark. Unfortunately, the author has not updated the statistics for several years. I will make my measurements on this project – https://github.com/tremp-m/AndroidStudioBenchmark (I made a fork from the original to be able to continue collecting statistics (https://docs.google.com/spreadsheets/d/1j7-xO7awL4VOzGK6LvikJrlb84BfMwb9dUapZjg3Fnc/edit?usp=drive_link ). If you wish, send us your results.).

Yes, in general this project cannot be a benchmark for measurements (the performance from the number of cores can be affected by the multi-modularity of the project), but it can provide some guidance (in my case, the results of the measurements in this project were perfectly extrapolated to my working project).
It was possible to take measurements on several systems – I added them to “my” (continuation of the table of the original project) statistics table. In the article, I will describe the results only for the 12400F, 14600KF and 14700KF processors – this will be enough to understand the trend. The rest of the results are in the table. I also had the opportunity to take measurements both under Windows 10 and under Hackintosh (which also turned out to be interesting). The required amount of RAM at the moment for myself was empirically determined – 32 GB (16 GB in 2024 is already too little).

Measurements on different systems

The latest data in the source table indicates that the “cold” build of the project on the Apple Macbook Pro 2021 M1 Pro takes 1:30, followed by 0:57 and 0:56. These will serve as a guide.

Measurements for Intel i5-12400F 32Gb (2×16 2-channel DDR4 3200, SSD M.2 NVME KINGSTON SKC2500M8500G) Windows 10 showed results of 2:22, 1:29 and 1:26. As expected, the results are worse than those of the Macbook Pro 2021 M1 Pro.
On almost the same system (another drive – SSD M.2 NVME WD_BLACK SN770 500GB) with Hackintosh (MacOS 13.3.1) the results are 2:16, 1:12, 1:09. The interesting thing here is that the “second” measurements are noticeably better compared to the system under Windows 10 and are already close to the Macbook Pro 2021 (there are doubts about the “cold” one – perhaps an inaccuracy has crept in – the difference with the repeated ones is too big, but there is no way to redo it at the moment).

The following measurements were taken for 14600KF (32Gb 2×16 2-channel DDR4 3200, SSD M.2 NVME WD_BLACK SN770 1TB) Hackintosh (MacOS 13.6.3) – 1:15, 0:42, 0:41 – significantly faster than 12400F and even faster than Macbook Pro 2021 M1 Pro.
At the next stage, the system (Hackintosh (MacOS 13.6.3)) had its RAM replaced with expensive DDR4 – 32Gb 2×16 2-channel DDR4 4133 (gear 2). The results improved slightly (but given the price difference, the feasibility is questionable) – 1:11, 0:41, 0:40. In Windows 10 Pro 22H2 with SSD M.2 NVME KINGSTON SKC2500M8500G, the results are noticeably worse – 1:35, 1:05, 1:05.
Now the system with 14700KF and 32Gb 2×16 2-channel DDR5 7200. Under Windows 10 Pro 22H2 with SSD M.2 NVME KINGSTON SKC2500M8500G – 1:24, 1:03, 1:02. Under Hackintosh (MacOS 13.6.7) with SSD M.2 NVME WD_BLACK SN770 500GB – 0:56, 0:42, 0:36. The results compared to 14600KF and DDR4 3200 are clearly higher (if we take into account the difference in performance per core in synthetic tests of 5%, then the increase here is not only due to the cores, but also seems to be due to RAM), but given the significant difference in the cost of components, you need to think – is it worth it?

Additional questions

The next question I wanted to answer was: how many and what kind of cores are needed for maximum performance with all other components being the same? I took several measurements with cores disabled in the BIOS in various combinations (the results are in the statistics table). As a result, the conclusion (again, for this project. If you optimized yours by dividing it into modules, then you can probably use more cores): 6 productive cores are enough – the assembly speed does not increase further. Energy-efficient cores cannot compensate for low performance per core with their number.
For the sake of completeness, I compared how SSD affects (and does it affect?) performance. For this, I compared measurements under Windows 10 Pro 22H2 for 14700KF with 32Gb 2×16 2-channel DDR5 7200 between SSD M.2 NVME KINGSTON SKC2500M8500G and SSD M.2 NVME WD_BLACK SN770 1TB. The results are 1:24, 1:03 and 1:02 against 1:22, 1:00, 0:59 in favor of WD_BLACK – there is a difference (stably repeatable), but not significant.
I also made some measurements for code generation in Flutter projects – it turned out that when the number of cores increases to more than 4, there is no increase in speed. That is, in fact, it does not affect the recommendations in any way.

conclusions

The CPU has the greatest impact on the build speed in 2024 (if we are talking about current components). Moreover, it is better to choose a 6-core with the highest performance per core. 4-cores are not relevant (Android Studio is able to load a larger number of cores). 8-cores are possible, but not at the expense of performance per core (or you know what you are doing, and you do not need this information).
RAM has an effect, but not as much as its cost increases. From 3200 DDR4 it is not bad, and then as the budget allows.
SSD also has little effect – it is better to take the most productive one within your budget.
But the main question for me personally remains: why is there such a big difference in performance in favor of Hackintosh on the same hardware?

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *