Is your feature request related to a problem? Please describe.
Dependency on Foundation affects significantly cold start.
Describe the solution you'd like
- Remove dependency on any Foundation types like
Date and Data.
- Extend API to be able to provide custom JSON encoder/decoder.
Additional context
Is your feature request related to a problem? Please describe.
Dependency on
Foundationaffects significantly cold start.Describe the solution you'd like
DateandData.Additional context
cold start of lambda is ~0.3s faster without
Foundation, decoding Event without any date formatters/decoders, difference increases when statically linked;Performance documentation awslabs/swift-aws-lambda-runtime#79 (comment)
FoundationJSON encoder/decoder has terrible performance on Linux, see Consider replacing Foundation JSON encoder awslabs/swift-aws-lambda-runtime#153 (comment), changing will improve performance ofAWSSDKSwiftnot only during cald startIt is relatively easy to use custom JSON encoder and remove dependency on
Foundationwhen using Swift AWS Lambda RuntimeIt is not possible not to link
Foundationwhen usingAWSSDKSwift,see Invocation time longer than expected on cold starts awslabs/swift-aws-lambda-runtime#163