New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize Kotlin reflection runtime efficiency #21546
Comments
Short term |
Kotlin Coroutines are now supported but require additional reflection entries due to how Coroutines generates bytecode with an `Object` return type, see spring-projects/spring-framework#21546 for a potential future fix. Closes gh-409
After a deeper look, I am not sure So my hope for the future is that we could collaborate with Kotlin team (cc @udalov @elizarov) to have a more optimized version of Could be useful for Jackson Kotlin support as well. That would be a good fit with Spring Framework 6. |
See also this related comment Kotlin/kotlinx.reflect.lite#12 (comment) and this one on KT-11386. |
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).The text was updated successfully, but these errors were encountered: