performance: remove significant overhead of decaymap (#1420)
I have ~5% base CPU load on an idle server due to mutex 100x per second. Signed-off-by: Matthias Dötsch <matze@mdoetsch.de>
This commit is contained in:
parent
23ec1b82a7
commit
d2bc5cadb9
3 changed files with 3 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ func TestImpl(t *testing.T) {
|
|||
|
||||
// Deletion of expired entries after Get is deferred to a background worker.
|
||||
// Assert it eventually disappears from the map.
|
||||
deadline := time.Now().Add(200 * time.Millisecond)
|
||||
deadline := time.Now().Add(700 * time.Millisecond)
|
||||
for time.Now().Before(deadline) {
|
||||
if dm.Len() == 0 {
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue