UDS - Changing pooling
element-of-surprise
released this
07 Feb 07:48
·
34 commits
to master
since this release
So I was using *bytes.Buffer{} and taking the buff.Bytes() and using them, then stuffing the buffer back into a sync.Pool. I thought I was being clever. Allocations were way better than gRPC, so yeah!
Wrong. So I changed pooling in two ways:
- uses *[]byte
- custom Pool type
The new pool type has a static free-list before it uses sync.Pool.
This is breaking on UDS (minor) and as noted, uds can be changed without a major revision until I remove the warning on the README.