-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove dependency on Foundation #344
Comments
CC @fabianfett |
I think you need to break this up into separate tasks. This is a huge task which would require us to replace
You would also need a FoundationCompat library to provide the interfaces that require Foundation. eg One thing that might hold all of this back though is There is an argument for doing some of this work still. We could look at replacing the JSONEncoder. I'm sure @fabianfett would be really keen on this. |
Same is true for AsyncHTTPClient
I think it would be enough to make the default JSONEncoder and JSONDecoder replaceable. Also I have an offering to replace UUID: https://github.com/fabianfett/swift-extras-uuid |
Good point. Removing Foundation from AHC would be a good starting point but someone needs to do an implementation of
Should be easy enough.
You can go ahead, although given we can't remove Foundation in the foreseeable future is this necessary? What do we gain, except less exposure. |
thank you for your feedback and identifying the main problems.
Had a (very) quick lock at
So technically its some work but probably not a huge effort - dumping a timestamp is much smaller task than rewriting |
I wouldn't be so sure of that. If you can produce a PR which removes Foundation I think there will be people sympathetic to it. |
Is your feature request related to a problem? Please describe.
Dependency on
Foundation
affects significantly cold start.Describe the solution you'd like
Date
andData
.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 swift-server/swift-aws-lambda-runtime#79 (comment)
Foundation
JSON encoder/decoder has terrible performance on Linux, see Consider replacing Foundation JSON encoder swift-server/swift-aws-lambda-runtime#153 (comment), changing will improve performance ofAWSSDKSwift
not only during cald startIt is relatively easy to use custom JSON encoder and remove dependency on
Foundation
when using Swift AWS Lambda RuntimeIt is not possible not to link
Foundation
when usingAWSSDKSwift
,see Invocation time longer than expected on cold starts swift-server/swift-aws-lambda-runtime#163
The text was updated successfully, but these errors were encountered: