-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Startup time optimization - redundant ObjectMappers #91
Comments
Nice, thanks for the suggestions @cslee00 - I'll make sure to do this for the next release. |
The first object mapper, in |
No, apologies, was reading from a search for |
I'm moving the object mapper to be a singleton inside the |
Thx! In my stream handler implementation (below) there is nothing specific to my code base, nor are there foreseeable points where there would be value to hooking into. The entire class could be provided by the container, with documentation on what to specify as the Lambda entry point (with some consideration to extension points for subclasses if need be). It seems this could also replace the need for implementations of RequestHandler, unifying the serialization mechanism (minor concern in having two different ways of serializing/deserializing the same message format)
|
We could provide a stream handler class for each framework. So far, we've tried to stay away from it because developers may want to perform additional business logic in the handler such as configuration for X-Ray. My plan was to publish some archetypes with version 1 of the framework and include the default stream handler in there. |
Closing this since it was addressed in the latest commit. It will go out with version 0.9. I will also update the samples to add a stream handler that re-uses the same ObjectMapper |
Profiling to reduce lambda cold-start time (Spring context, not Boot).
There are 2 or 3 ObjectMappers created, which take a moderate amount of time to initialize:
#1 & #2 could be hoisted out to a single instantiation.
Ideally the same ObjectMapper would be used for #3, possibly through handler.proxy( inputStream, context) to hide this inside the container.
The text was updated successfully, but these errors were encountered: