swift-aws-lambda-runtime icon indicating copy to clipboard operation
swift-aws-lambda-runtime copied to clipboard

Add ControlPlaneResponseDecoder

Open fabianfett opened this issue 3 years ago • 0 comments

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.

fabianfett avatar Jan 03 '22 09:01 fabianfett