FerretDB / wire

Apache License 2.0
2 stars 3 forks source link

Optimize logging in `wirebson` #23

Closed AlekSi closed 2 weeks ago

AlekSi commented 1 month ago

As existing benchmarks show, logging is slow and allocates too much. We should speed it up.

One idea is to use strings.Builder and pass it to recursive logMessage calls instead of simply concatenating strings.

Run benchmarks before and after, and show benchstat output.