Make sure we glob only once
The current code would lock to check if a glob was already computed,
release the lock and compute the glob if not, then lock again to
store the results. This caused races where some globs would be
computed multiple times. When expanding our usages of globs for
action sandboxing, it caused big analysis time slowdowns.
Only do each glob once by switching to a SyncMap, and adding a
LoadOrCompute helper method to it.
Bug: 473821643
Test: Presubmits
Change-Id: I1dcd5fae03c9099885017775b7297aae09a96afd
5 files changed