VictoriaMetrics/lib/bytesutil
Aliaksandr Valialkin faf07fbc67
lib/bytesutil: optimize internStringMap cleanup
- Make it in a separate goroutine, so it doesn't slow down regular intern() calls.

- Do not lock internStringMap.mutableLock during the cleanup routine, since now
  it is called from a single goroutine and reads only the readonly part of the internStringMap.
  This should prevent from locking regular intern() calls for new strings during cleanups.

- Add jitter to the cleanup interval in order to prevent from synchornous increase in resource usage
  during cleanups.

- Run the cleanup twice per -internStringCacheExpireDuration . This should save 30% CPU time spent
  on cleanup comparing to the previous code, which was running the cleanup 3 times per -internStringCacheExpireDuration .
2024-06-13 15:09:42 +02:00
..
bytebuffer_test.go
bytebuffer.go lib/slicesutil: add helper functions for setting slice length and extending its capacity 2024-05-12 11:33:49 +02:00
bytesutil_test.go
bytesutil_timing_test.go lib/bytesutil: make BenchmarkToUnsafeString and BenchmarkToUnsafeBytes more reliable 2024-02-29 17:12:30 +02:00
bytesutil.go lib/bytesutil: use unsafe.String instead of unsafe conversion of slice header to string header 2024-02-29 17:28:04 +02:00
fast_string_matcher_test.go lib: consistently use atomic.* types instead of atomic.* functions 2024-02-24 02:10:04 +02:00
fast_string_matcher_timing_test.go lib: consistently use atomic.* types instead of atomic.* functions 2024-02-24 02:10:04 +02:00
fast_string_matcher.go lib: consistently use atomic.* types instead of atomic.* functions 2024-02-24 02:10:04 +02:00
fast_string_transformer_test.go
fast_string_transformer_timing_test.go lib: consistently use atomic.* types instead of atomic.* functions 2024-02-24 02:10:04 +02:00
fast_string_transformer.go lib: consistently use atomic.* types instead of atomic.* functions 2024-02-24 02:10:04 +02:00
internstring_test.go Makefile: update golangci-lint from v1.51.2 to v1.54.2 2023-09-01 10:25:49 +02:00
internstring_timing_test.go
internstring.go lib/bytesutil: optimize internStringMap cleanup 2024-06-13 15:09:42 +02:00
itoa_test.go
itoa.go