Soong vs. Make: build time data?

2,310 views
Skip to first unread message

Anuj Goyal

unread,
Nov 21, 2016, 3:24:46 PM11/21/16
to Android Building
Does anyone have any comparison data on Soong biuld times vs. Make build times?

1. Initial build
2. Incremental builds


-Anuj

Colin Cross

unread,
Nov 21, 2016, 3:47:44 PM11/21/16
to android-...@googlegroups.com
The answer differs depending on which platform version you are
building and what you are changing in the incremental build.

In M, builds are done entirely using make. All incremental builds
take 1-2 minutes just to parse the makefiles.

In N we introduced Kati, which is a precursor of the Soong project.
Kati converts makefiles to a build.ninja files, and only needs to
regenerate the build.ninja file if a change has been made that affects
reading the makefiles (primarily editing a makefile, but also anything
that changes the results of a $(wildcard) or $(shell) command in a
makefile). This cuts incremental build times with no changes down to
~10 seconds, but some changes will still require the full 1-2 minutes
to reread all the makefiles. Clean build time should not be
significantly affected, it is dominated by running all the compile
commands.

N also has a preview of Soong, which can be enabled with make
USE_SOONG=true. This will use Soong Android.bp files for a few
projects where they exist (primarily bionic/ and its dependencies),
ignoring the Android.mk files there. Again, clean build time will
not be affected, but many modifications to the Android.bp file will
only take ~5 seconds to regenerate the manifest instead of 1-2 minutes
for an Android.mk file. Some information like the list of module
names and their installation dependencies still need to be exported to
make, so some changes to an Android.bp file may trigger rereading
makefiles and take 1-2 minutes.

In AOSP master, Soong is always enabled, and many projects only have
Android.bp files now. Incremental build performance is similar to N
with USE_SOONG=true.

The targets for Soong is to have an incremental build with no changes
be under 5 seconds, and the time to start running build commands to be
under 10 seconds for all incremental builds.
> --
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> 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 android-buildi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages