トラッキング コード

2/26/2012

Setting up ccache, Because build speed up

http://source.android.com/source/initializing.html#ccache

Put the following in your .bashrc or equivalent.

export USE_CCACHE=1

By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.

export CCACHE_DIR= "path-to-your-cache-directory"

The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.
prebuilt/linux-x86/ccache/ccache -M 50G



I measured the build time.

My builing pc spec

SSD:128G
memory:16G
CPU:Corei7 2600
OS:Ubuntu 10.04LTS

Build:1st time

Because creating ccache, do full build of android-4.0.3_r1.
$ . build/envsetup.sh
$ lunch full_maguro-userdebug
$ time make -j8

Time:
real 32m8.076s
user 249m16.350s
sys 13m3.600s

Building:2nd time

Because remove out directory, do "make clean".

$ make clean
$ time make -j8

Time:
real 14m30.814s
user 108m57.690s
sys 7m32.390s


Speed up

Build time speed up, to set Ccache enable!!
32m8.076s -> 14m30.814s

No comments:

Post a Comment