-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sync.Map instead of mutex synchronization for mapper cache
There was a lot of contention on the cache mutex. At the same time the cache only grows. This is the case that sync.Map was created for, so use it instead to improve performance. After applying this patch, we no longer see the contention in the profiler. Fixes #2
- Loading branch information
1 parent
8e28c7b
commit 0fbd3dd
Showing
1 changed file
with
7 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters