metadata: use os.walk to speedup metadata file discovery
os.walk is more efficient than the current handwritten traversal. Measured the time to scan reduced from 30s+ to 8s on p920 on chromium/src. `followlinks=True` is set to preserve behavior that os.path.isdir returns True for symlink to directories, and the current traversal code will descend into those. Change-Id: I941eec9105a46d6538ca484fbb5249a75888e38a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5379945 Reviewed-by: Anne Redulla <aredulla@google.com> Commit-Queue: Jiewei Qian <qjw@chromium.org>changes/45/5379945/2
parent
3155d7d074
commit
13d20527ff
Loading…
Reference in New Issue