mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-16 21:34:59 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user