Skip to content

Consider caching interface-derived BeanInfo instances in CachedIntrospectionResults [SPR-16568] #21110

Closed
@spring-projects-issues

Description

@spring-projects-issues

Andy Wilkinson opened SPR-16568 and commented

CachedIntrospectionResults currently caches the results for the Class passed to forClass(Class), but not for the Class passed to getBeanInfo(Class, boolean). If multiple classes passed to forClass(Class) implement the same interface, multiple BeanInfo instances will be created for that interface. For example, in a small Spring Boot sample application 27 BeanInfo instances are created for org.springframework.core.Ordered.

This doesn't appear to have too much impact in a small application, but as an application grows and there are more classes implementing the same interfaces, I wonder if caching would become increasingly beneficial?


Affects: 5.0.4

Issue Links:

Referenced from: commits a02aafe

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions