Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improves performance of json responses (#7522)
**What this PR does / why we need it**: This allows to reuse stream memory allocations between responses. Related #3163 but this time this is for the encoding. ``` ❯ benchstat before.txt after.txt name old time/op new time/op delta _Encode-16 29.2µs ±12% 25.2µs ± 1% -13.85% (p=0.016 n=5+4) name old alloc/op new alloc/op delta _Encode-16 24.9kB ± 6% 16.4kB ± 8% -34.20% (p=0.008 n=5+5) name old allocs/op new allocs/op delta _Encode-16 145 ± 0% 129 ± 0% -11.03% (p=0.008 n=5+5) ```
- Loading branch information