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
My project has one hundred thousand beans+ to initialize into spring. However every time it needs several imnutes to complete its work. I found ClassPathBeanDefinitionScanner.doScan 's code which does work one by one.
So I have a question, because it use Set to collect, can we use ConcurrentHashMap<BeanDefinition, Object> instead of it? That map's value just can use any Object such as new Object to fill it like Set inner code.
My spring version : 5.1.19.
Below is that current release code:
My Suggestion is that:
`protected Set doScan(String... basePackages) {
Assert.notEmpty(basePackages, "At least one base package must be specified");
Set beanDefinitions = new LinkedHashSet<>();
My project has one hundred thousand beans+ to initialize into spring. However every time it needs several imnutes to complete its work. I found ClassPathBeanDefinitionScanner.doScan 's code which does work one by one.
So I have a question, because it use Set to collect, can we use ConcurrentHashMap<BeanDefinition, Object> instead of it? That map's value just can use any Object such as new Object to fill it like Set inner code.
My spring version : 5.1.19.
Below is that current release code:
My Suggestion is that:
`protected Set doScan(String... basePackages) {
Assert.notEmpty(basePackages, "At least one base package must be specified");
Set beanDefinitions = new LinkedHashSet<>();
The text was updated successfully, but these errors were encountered: