Performance Improvement: Enable Lazy Initialization #12500
Labels
info: example-attached
relates-to: spring-framework
type: enhancement
New feature or request
type: performance
Spring Boot 2.2 M1, Provide a configuration option to enable lazy initialisation
https://spring.io/blog/2019/03/14/lazy-initialization-in-spring-boot-2-2
Currently, Grails 5 support lazy initialization like this,
In Grails, if not set
lazyInit
, theBeanDefinition.isLazyInit()
will befalse
default.We can't config
spring.main.lazy-initialization
to enable global lazy initialization.In Spring Boot
LazyInitializationBeanFactoryPostProcessor
, this PostProcessor will set LazyInittrue
if getLazyInit() wasnull
, but Grails always setfalse
.I create a large Grails app which has 2000 Beans, and I configure them in
conf/spring/resources.groovy
,then, I test it on my old MacBook,
Also I edit the Grails source code, to enable lazy initialization like Spring Boot 2.2,
the test result was below, it's better than previous version.
The text was updated successfully, but these errors were encountered: