Currently AutowiredAnnotationBeanPostProcessor has a few caches that aren't providing that much in a typical application. They're also no cleared once a context has been refreshed.
Specifically:
candidateConstructorCacheis not hit in a typical Spring Boot application and seems unnecessary if there's only a single constructor.injectionMetadataCacheis typically hit twice for singletons and always once after the other. The calls come frompostProcessPropertiesandpostProcessMergedBeanDefinition, both fromdoCreateBean. We could perhaps get away with a single element cache (at least for singletons).@Lookupsupport happens for each class and also uses a cache. It's not a particularly common pattern anymore and it would be nice if it could be skipped if we know it's not in use. Perhaps we can skip it for auto-configuration classes.