serverless-java-container
serverless-java-container copied to clipboard
fix: reuse AsyncInitializationWrapper in SpringDelegatingLambdaContainerHandler
Issue #, if available: #758
Description of changes:
Did some testing with this app https://github.com/aws-samples/aws-lambda-java-workshop/tree/main/labs/unicorn-store/software/unicorn-store-spring and 512 MB memory.
Comparison between
old StreamLambdaHandler
implementation: Duration: 648.79 ms Billed Duration: 649 ms Memory Size: 1024 MB Max Memory Used: 333 MB Init Duration: 9747.09 ms
and
new SpringDelegatingLambdaContainerHandler
Duration: 16626.82 ms Billed Duration: 16627 ms Memory Size: 1024 MB Max Memory Used: 330 MB Init Duration: 1344.65 ms
With this change the init is done properly. Threading still needs to be removed from SCF.
By submitting this pull request
- [X] I confirm that my contribution is made under the terms of the Apache 2.0 license.
- [X] I confirm that I've made a best effort attempt to update all relevant documentation.
LGTM
LGTM as well