GODRIVER-3450Backlog

Improve pooled buffer reuse pattern

h3. *Context* There are some cases where the pooled buffer behavior is unexpected: * {{bytes.Buffer}} is always initialized with at least 64 bytes. If only values smaller than half of that (32 bytes) are marshaled, buffers will never be reused because of the buffer used capacity check (see [here|https://github.com/mongodb/mongo-go-driver/blob/a9eddec0e7cf4cf37b504d220a33226a3c28bf72/bson/marshal.go#L72] and [here|https://github.com/mongodb/mongo-go-driver/blob/a9eddec0e7cf4cf37b504d220a33226a3

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
perfrank-higher