Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PERF] ThemesRepresentation parsing during runtime #42874

@mabartos

Description

@mabartos

Magnitude

🟢 LOW

Consumed samples (~): 30s
Memory allocation (~): 1.3MB

Description

The themes from the META-INF/keycloak-themes.json file are parsed during the runtime. It'd be good to move it left to the build time. There's also some additional parsing of .properties.

 protected void loadThemes(ClassLoader classLoader, InputStream themesInputStream) {
        try {
            loadThemes(classLoader, JsonSerialization.readValue(themesInputStream, ThemesRepresentation.class));
        } catch (Exception e) {
            throw new RuntimeException("Failed to load themes", e);
        }
    }
Image

Class ClasspathThemeProviderFactory.

Mitigation

Parse themes during build time and produce it to runtime (if possible)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions