bee icon indicating copy to clipboard operation
bee copied to clipboard

Optimize logger alocations

Open mrekucci opened this issue 3 years ago • 2 comments

Write benchmark for logger and optimize memory allocations to a minimum. Consider a lock-free linked list as a data structure.

Resources: https://github.com/golang/glog/blob/master/glog.go#L488-L502 http://hackemist.com/logbench/ https://github.com/imkira/go-loggers-bench https://gist.github.com/Avinash-Bhat/48c4f06b0cc840d9fd6c https://github.com/uber-go/zap/tree/master/benchmarks

mrekucci avatar Aug 19 '22 19:08 mrekucci

have we seen any instances where the logging is a bottleneck?

istae avatar Sep 18 '23 08:09 istae

have we seen any instances where the logging is a bottleneck?

Not really, it's just to avoid unnecessary memory allocations and put less strain on the GC.

mrekucci avatar Sep 18 '23 08:09 mrekucci