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:
Matthias Dötsch 2026-01-22 20:03:17 +01:00 committed by GitHub
parent 23ec1b82a7
commit d2bc5cadb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -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