As you may know, compile time DI is a lot faster than runtime DI which spring DI is. I am wondering if we can add support for compile time DI for spring boot since spring boot come with a great support for many things. It is relatively heavy and slower than other DI like Dagger 2. I believe if spring DI can be convert or support compile time DI, it would be a game changer.
Comment From: denon82
You can achieve It with graalvm.
On Tue, 3 Aug 2021, 18:10 Vu Do, @.***> wrote:
Enhancement (please don't include this emoji/text, just add your details)
As you may know, compile time DI is a lot faster than runtime DI which spring DI is. I am wondering if we can add support for compile time DI for spring boot since spring boot come with a great support for many things. It is relatively heavy and slower than other DI like Dagger 2. I believe if spring DI can be convert or support compile time DI, it would be a game changer.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/issues/27551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL55TANSYS6HYNQWYSCE6LT3APIVANCNFSM5BPH5JTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Comment From: voduku
I have been following spring natives project but I didn't hear anything about DI. I must have missed it or didn't fully understand graalvm.
Comment From: bclozel
Thanks for reaching out, but there's nothing we can do at this time in Spring Boot. We're indeed experimenting with build-time approaches in Spring Native, and some of it might make it to Spring Framework and Spring Boot depending on the results.
Now DI is just a tiny part of what's being done at startup time - developers sometimes blame classpath scanning (or some other feature) for startup times, but it's often more complex than that. If you've experienced slow startup times, feel free to use our application startup tracking feature and report back with a JSON timeline for your application.
I'm closing this issue for now, but this doesn't mean this won't be addressed in some form in the future.