OSDN Git Service

Speed up lunch/tapas/etc. shell utility functions.
authorYing Wang <wangying@google.com>
Fri, 4 Mar 2016 04:57:21 +0000 (20:57 -0800)
committerYing Wang <wangying@google.com>
Fri, 4 Mar 2016 22:02:03 +0000 (14:02 -0800)
commit7dfdb843b25b4ef04c47b148e0095f292eceacd4
treea0492da1a910abe227bf444996055825d178dc91
parent063d0455e0f3a14f2577a26715f82e0bf3e79ee9
Speed up lunch/tapas/etc. shell utility functions.

1. Combined ~10 calls to the make build system to only one.
   We added a phony target "dump-many-vars" to the build system to dump
   "<var>=<value>" pairs. We then store the pairs as shell variables.
   With this cache get_build_var/get_abs_build_var can just return
   the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.

In internal source tree lunch time was reduced from ~15s to ~1.5s.

Bug: 27429759

(cherry picked from commit 08800fd905e70faf01d9392d00ff3f49d99097b7)

Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
core/dumpvar.mk
core/envsetup.mk
core/product.mk
envsetup.sh