FerretDB / wire

Apache License 2.0
3 stars 3 forks source link

Optimize logging in `wirebson` #23

Closed AlekSi closed 2 months ago

AlekSi commented 3 months 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.