Improve histograms presubmit perf by memoizing dirmd lookups.
This addresses a performance regression where histograms presubmits were taking > 2 minutes after: https://chromium-review.googlesource.com/c/chromium/src/+/2450734 This CL adds memoization to dirmd invocations because only a few distinct OWNERS files are specified as owners of histograms, so we can reduce the amount of subprocess invocations significantly. On my machine, ./tools/metrics/histograms/validate_format.py goes from 2m8s to 25s with this change with Python 2. Bug: 1142714 Change-Id: I1f60c60b7e6014008244c214ec7302f40e58517a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2505593Reviewed-by:Caitlin Fischer <caitlinfischer@google.com> Commit-Queue: Alexei Svitkine <asvitkine@chromium.org> Cr-Commit-Position: refs/heads/master@{#821756}
Showing
Please register or sign in to comment