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
Profiling the Spring Boot Petclinic sample shows that the getMergedBeanDefinition method in AbstractBeanFactory is called 80,000+ times (and before configuration is frozen). The main callers are getType and getTypeMatch.
We could improve performance by not always cloning the BeanDefinition in this method.
I'm trying a slightly different approach now: allowing for early caching of merged bean definitions, enforcing a fresh re-cache step once a bean is about to be created (in order to catch the latest metadata modifications if any).
The re-caching approach seems to work fine in combination with a few extra measures, such as re-caching not only when a bean is about to be created but also after the ApplicationContext post-process phase. Some pre-resolved metadata is critical to retain afterwards though, e.g. for qualifier matching on factory methods, so we keep the merged bean definition around afterwards.
Phil Webb opened SPR-12236 and commented
Profiling the Spring Boot Petclinic sample shows that the
getMergedBeanDefinition
method inAbstractBeanFactory
is called 80,000+ times (and before configuration is frozen). The main callers aregetType
andgetTypeMatch
.We could improve performance by not always cloning the
BeanDefinition
in this method.Affects: 4.1 GA
Issue Links:
Referenced from: commits 09eb492
The text was updated successfully, but these errors were encountered: