kuberay
kuberay copied to clipboard
chore: reduce memory allocation on handling http response
Why are these changes needed?
After getting response from ProxyActorHealth, the body is not used if the status is 200. It causes an unnecessary allocation.
Here are the simulation of code from benchmark.
before:
after:
Related issue number
Checks
- [x] I've made sure the tests are passing.
- Testing Strategy
- [ ] Unit tests
- [ ] Manual tests
- [ ] This PR is not tested :(