First Initialization and Execution of ObjectMapper.readValue is Slow
I happened to find that first initialization and execution of ObjectMapper.readValue
of an application is slow, no matter if I reuse static objectMapper
or use new objectMapper
instance every time, the first-time cost won't disappear. But overall, static objectMapper
is faster than instance.
The first execution would cost about 420ms, however the second only needs 23ms. No matter I execute the static objectMapper
first or objectMapper
instance, the first one is the longest one.
Executable code: repo