swift-aws-lambda-runtime
swift-aws-lambda-runtime copied to clipboard
Add ControlPlaneResponseDecoder
Add ControlPlaneResponseDecoder to decode incoming HTTP responses.
Motivation:
We want to save allocations wherever possible. A big driver of allocations is the NIOHTTP1 HTTPResponseDecoder. The reason for this is: It can not be optimized for the lambda use case and allocates header string values that are not needed.
Modifications:
- Add ControlPlaneResponseDecoder to decode only what we need from an HTTP response
- Add LambdaRuntimeError which shall be the single error type in the future
Result:
Faster control plane response decoding.