Skip to content

Optimize Kotlin reflection runtime efficiency #21546

Open
@spring-projects-issues

Description

@spring-projects-issues
Collaborator

kotlin-reflect is a big 2 MB JAR, producing important CPU and memory spikes at startup on the JVM.

It would be interesting to explore if it could be replaced by a lighter incarnation like https://github.com/Kotlin/kotlinx.reflect.lite or use kotlinx-metadata-jvm at build time to generate some kind of reflection index. jackson-module-kotlin should also work with similar approach (not blocking now that we have Kotlin Serialization support).

Activity

modified the milestones: 5.2 M1, 5.x Backlog on Jan 30, 2019
changed the title [-]Support for kotlinx.reflect.lite [SPR-17008][/-] [+]Use kotlinx-metadata-jvm at build time instead of kotlin-reflect at runtime[/+] on Dec 18, 2020
sdeleuze

sdeleuze commented on Jan 28, 2021

@sdeleuze
Contributor

Short term kotlin-reflect usage could be optimized, especially for native use case, by KT-44594 so feel free to vote for it on Kotlin issue tracker.

72 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: blockedAn issue that's blocked on an external project changetheme: kotlinAn issue related to Kotlin supporttype: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @cowtowncoder@sdeleuze@poutsma@jhoeller@spring-projects-issues

      Issue actions

        Optimize Kotlin reflection runtime efficiency · Issue #21546 · spring-projects/spring-framework