diff options
| author | 2023-08-30 22:20:54 +0000 | |
|---|---|---|
| committer | 2023-08-31 00:30:24 +0000 | |
| commit | 43dfeb6d10040e968c036485f87203212f868731 (patch) | |
| tree | 5098d48a7f0e62f9afd58bc78e97438a73545ed9 /java/kotlin_test.go | |
| parent | 37aa33fcb1d1e7de18534ecebf7cd63825b8c201 (diff) | |
Replace sync.Mutex with Sync.Map
createProtoLibraryTargetsForIncludeDirs uses a lock-protected plain map
to see if a directory has been handled previously during concurrent visits
of modules in bp2build.
From golang's docs https://pkg.go.dev/sync#Map, replacing sync.Mutex
with sync.Map will be faster in this use case since the keys (directores
here) are written just once but read many times.
Test: m bp2build
Change-Id: Ia2a471b4db5d2890fa6048bc05a17cebc5f686af
Diffstat (limited to 'java/kotlin_test.go')
0 files changed, 0 insertions, 0 deletions