I fear it's not about opportunity cost, 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. 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.
