You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I set up global lazy init in springboot application builder and run it.
code like this: new SpringApplicationBuilder(TestWebApp.class).lazyInitialization(true).run(args);
but I find nacos call org.springframework.beans.factory.ListableBeanFactory#getBeansOfType(java.lang.Class<T>, boolean, boolean) method at com.alibaba.nacos.spring.context.event.AnnotationListenerMethodProcessor#processBeans(org.springframework.context.ApplicationContext), the getBeansOfType method init all beans,and it take a long time.
Expected behavior
nacos can follow the @Lazy.
Actually behavior
nacos get all beans, then all beans init.
How to Reproduce
Steps to reproduce the behavior:
create a springboot application
set up global lazy init
run it
see the CPU profile, you can see nacos take a long time to process beans.
Desktop (please complete the following information):
OS: Macos 15
Version [nacos-spring-context 1.1.1]
Module [config]
SDK [nacos]
Additional context
there are two CPU profile html file to compare with global lazy and no lazy.
Describe the bug
I set up global lazy init in springboot application builder and run it.
code like this:
new SpringApplicationBuilder(TestWebApp.class).lazyInitialization(true).run(args);
but I find nacos call
org.springframework.beans.factory.ListableBeanFactory#getBeansOfType(java.lang.Class<T>, boolean, boolean)
method atcom.alibaba.nacos.spring.context.event.AnnotationListenerMethodProcessor#processBeans(org.springframework.context.ApplicationContext),
the getBeansOfType method init all beans,and it take a long time.Expected behavior
nacos can follow the
@Lazy
.Actually behavior
nacos get all beans, then all beans init.
How to Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
Additional context
there are two CPU profile html file to compare with global lazy and no lazy.
cpu_profiles.zip
The text was updated successfully, but these errors were encountered: