Skip to content

Remove preinitialisation of Charset.availableCharsets() as StringHttpMessageConverter now uses it lazily #13423

Closed
@dsyer

Description

@dsyer

I think BackgroundPreinitializer probably initializes Charset.availableCharsets() to avoid it happening in StringHttpMessageConverter. The internals of StringHttpMessageConverter changed in Spring 5 so that Charset.availableCharsets() is called lazily, so we probably don't have to pay this cost on startup in Spring boot 2.0, even in a background thread. It causes quite a bit of activity including GC pressure.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions