Closed
Description
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:
- inside AwsProxyRequestBuilder (new ObjectMapper())
- inside AwsProxyExceptionHandler (new ObjectMapper())
- user-created when using RequestStreamHandler (new ObjectMapper())
#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.