Skip to content

Performance regression for custom autowireBean calls with many properties [SPR-11875] #16494

Closed
@spring-projects-issues

Description

@spring-projects-issues

Trask Stalnaker opened SPR-11875 and commented

Autowiring in our application became a large bottleneck after updating to Spring 3.2.

Please see benchmark of autowiring an object with 100 setters at https://github.com/trask/spring-autowire-benchmark

This used to take 2 microseconds in spring 3.1.4, but now takes 400 microseconds in spring 3.2.0+.

The regression appears to be caused by the fix for #13596, which disables caching of property descriptors in order to fix a memory leak.

What do you think of using org.springframework.util.ConcurrentReferenceHashMap for the property descriptor cache in order to keep the benefit of caching, while still addressing the memory leak reported in #13596?


Affects: 3.2 GA, 4.0.5

Issue Links:

Referenced from: commits f4062bc, c32d559, 974bd43

Backported to: 3.2.10

0 votes, 8 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancementtype: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions