fluxninja / aperture

Rate limiting, caching, and request prioritization for modern workloads
https://docs.fluxninja.com
Apache License 2.0
635 stars 25 forks source link

Use vtprotobuf for faster unmarshalling and less mallocs #2212

Closed krdln closed 1 year ago

krdln commented 1 year ago

Links:

Performance improvements should come from two aspects:

krdln commented 1 year ago

Discovered that pooling in vtprotobuf is a bit underpowered (this is known – there are issues on the repo):

Basically, in practice pooling basically works for preserving capacity for slices of strings, which is something, but leaves lot of allocs on the table. Also, note that the major source of allocs in proto unmarshalling are strings, which is something not fixable by pools in Go.