According to https://github.com/spring-projects/spring-framework/issues/23905#issuecomment-604134669, the getMetaAnnotationTypes usage in AnnotationBeanNameGenerator turned into a bottleneck since getMetaAnnotationTypes is implemented using on-demand retrieval now. As a consequence, we should cache its result for the stereotype check in AnnotationBeanNameGenerator.