google / kati

An experimental GNU make clone

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hard code Android OUT_DIR as out in find emulator

jzhupo opened this issue · comments

commented

If Android OUT_DIR is not called out, find emulator will traverse it and waste some time.
Maybe need to check OUT_DIR environment or bypass the folder marked with --ignore_dirty.

If we use OUT_DIR, setting OUT_DIR=out/foobar will make ckati slower. Maybe checking both "out" and OUT_DIR is OK, but do you actually need setting OUT_DIR to somewhere in source tree which doesn't start with "out"?

commented

In generate, I'd like to set OUT_DIR=out_xxx, such as out_foo or out_far..., in order to use one shared source code to build into multiple products' out without installclean. It actually starts with "out". But the code !strcmp(ent->d_name, "out") in find.cc require it must be equal to "out", not start with. Maybe a configurable pattern is better, or use other way instead of naming to judge OUT_DIR. For example, if a folder contain files like .kati_stamp-*, we can assume it is OUT_DIR and stop traversing.

Which use of the find emulator is causing the slowdown? We deliberately put an empty Android.mk in each out directory in order to prevent traversing it for the Android.mk searches. See https://android-review.googlesource.com/#/c/181846/

commented

I think commit 8543327 could solve this issue, although it is at the cost of time. Thanks.