On Fri, Oct 17, 2025 at 12:13 PM 'asquator' via Android Building <[email protected]> wrote: > > > I fear it's not about opportunity cost,
i fear you need to read https://en.wikipedia.org/wiki/Opportunity_cost :-) in this specific case: imagine you have 40 hours for fixing bugs this week. do you spend that on reducing memory usage for the tens of hobbyists/students who're trying to build an entire OS on a laptop ... or do you spend that time on fixing something that the billions of actual users will notice? because you only get to spend those 40 hours once. > but a lack of optimization. For example, I've recently synced my AOSP build > and it took just one minute, meaning there's nothing to do. When I added a > *single* binary module and triggered a build, I had to wait for *65 minutes* > before it finished. The build process was constantly consuming 12gb + 32gb > memory (the latter being swap). Something is definitely wrong here, as > incremental builds should be quick. Why is so much memory used when adding > just one module? Is the entire source tree re-scanned in memory? What's the > chance I'm doing something wrong? All this time the build was hanging with > the lines: > > [100% 1/1] bootstrap blueprint > Running globs... > > I'm syncing in ASfP. > > Developing on commodity machines is made somewhat impossible, as it may take > hours to include any addition in the module graph, and the PC becomes > unusable at that moment. sure, but it's already "somewhat impossible" because there's an entire operating system's worth of code to build, so anyone trying to actually get anything done is going to get a huge return on investment from buying a more ram and more/faster cpu cores. because again, you only get to spend your 40 hours one way, and hours spent "waiting for an entire operating system to build on a laptop" rather isn't going to help any of those billions of users... 16GiB wasn't enough to build comfortably a decade ago. and while, yes, if you were their boss you could have an engineer try to reduce those requirements ... but you'd have a hard time justifying to _your_ boss why that engineer wasn't fixing something that would improve the product. especially because the cost of 128GiB of ram isn't going to pay that engineer's wages (even if they're on minimum wage!) for one whole 40 hour week. https://en.wikipedia.org/wiki/Opportunity_cost don't get me wrong: obviously it sucks to be a student or in a country where minimum wage is a lot lower than the local figure i used, where "buy a build machine that meets the suggested specifications on https://source.android.com/docs/setup/start#hardware-requirements", but that's opportunity cost in action too --- if that's the most valuable bug for you to fix, go for it! > On Tuesday, October 14th, 2025 at 9:32 PM, 'enh' via Android Building > <[email protected]> wrote: > > > there's probably some reduction in memory usage possible, but probably > > at the cost of increasing the [already long] build time. so it's just > > simple economics --- no-one's going to do that work because it would > > be useless to folks doing lots of builds, and a net loss in terms of > > opportunity cost. > > > > On Mon, Oct 13, 2025 at 2:14 PM 'asquator' via Android Building > > [email protected] wrote: > > > > > Hello, > > > > > > I'm new to AOSP and I have just completed the building process. It was > > > not easy to do it even on a pretty strong PC that handles all the [heavy] > > > development tasks I have. For the first time I had to create a swapfile > > > of 32G in addition to my 16G ram so the build process doesn't crash. I'm > > > not even talking about the 250G+ (!!!) it now takes on my disk. The > > > compilation itself was pretty quick, but the Soong scanning is really a > > > serial RAM killer. Does it load the entire dependency graph into memory? > > > Or why is the consumption so high? > > > I've seen the minimal resource requirements on the docs page, and it > > > makes me sad. Is it a techonogical limit we bumped into, the one that > > > can't be shifted, or is it a lack of optimizations? There is no way to > > > tell Soong to consume less memory and cache on disk, except swap or > > > memory compression. And it's still not clear to me why the build eats so > > > much disk space - no way Android itself is that heavy. > > > I'm probably missing a lot of things as a newcomer, and I'd be happy to > > > get some directions to relevant sources that explain why the build should > > > be such a pain (should it?). Are there any plans to optimize it in the > > > future? Again, the sole idea of having such high requirements just looks > > > wrong to me... Seen many similar posts in the past, but I don't think any > > > of them got enough of community attention. > > > > > > Thank you! > > > > > > -- > > > -- > > > You received this message because you are subscribed to the "Android > > > Building" mailing list. > > > To post to this group, send email to [email protected] > > > To unsubscribe from this group, send email to > > > [email protected] > > > For more options, visit this group at > > > http://groups.google.com/group/android-building?hl=en > > > > > > --- > > > You received this message because you are subscribed to the Google Groups > > > "Android Building" group. > > > To unsubscribe from this group and stop receiving emails from it, send an > > > email to [email protected]. > > > To view this discussion visit > > > https://groups.google.com/d/msgid/android-building/I7AUUF9E7AOwKELcLt6540Gni6pcWrmEZC3SaclPdvQi2e2Iv4Y4g_55nWG_S7Go3PA2qb1IcIXqX05dc-G4xfLHsax1z4d7VDv2tpXFuuo%3D%40proton.me. > > > > > > -- > > -- > > You received this message because you are subscribed to the "Android > > Building" mailing list. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/android-building?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups > > "Android Building" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To view this discussion visit > > https://groups.google.com/d/msgid/android-building/CAJgzZooLYPUDBF6MnQS94QVCcgG3KO6EQk7VRXz1RMV6hr6qkw%40mail.gmail.com. > > -- > -- > You received this message because you are subscribed to the "Android > Building" mailing list. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-building?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "Android Building" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/android-building/4sNDx8J7Mtm61IY3elXQMKnxEnLfwOP3sM_q1OSIvjlQShm1SExKIwJoZwFhAUa4f02BNzjTIy3VsntLY_38OCC_hE7LenJKlxBYhjkUPQk%3D%40proton.me. -- -- You received this message because you are subscribed to the "Android Building" mailing list. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-building?hl=en --- You received this message because you are subscribed to the Google Groups "Android Building" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/android-building/CAJgzZorN-HADk8QYEvshmXkR65M5%3DaeZxwiPadFSLZMyPSax_w%40mail.gmail.com.
