8000 [PERF] Property mappers initialization · Issue #33955 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[PERF] Property mappers initialization #33955
Open
@mabartos

Description

@mabartos

Magnitude

🔴 HIGH

Consumed samples (~): 202s
Memory allocation (~): 10.14MB

Description

All property mappers are initialized in the static block, which is quite time-consuming and additionally, the memory allocation is also quite high.

Image

Mitigation

Do not initialize all property mappers, when it's not needed. These are used only in the startup based on the configurations found from various sources (CLI, ENV, properties,...). We could lazily initialize them when the specific mapper is needed and cache it to the memory if necessary. Some kind of Map<String, Supplier<PropertyMapper>> might be suitable for this scenario. When the option name matches the property mapper, the particular mapper will be initialized.

Might be connected to #27025.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0