Description
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:
- org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBean() causes ClassLoader leak [SPR-8956] #13596 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBean() causes ClassLoader leak
- Memory leak when using annotation based auto-wiring in child context [SPR-11520] #16145 Memory leak when using annotation based auto-wiring in child context
- Optimize performance of autowiring for Groovy/Grails [SPR-11864] #16483 Optimize performance of autowiring for Groovy/Grails
- ReflectionUtils slow down application startup on WebSphere [SPR-11882] #16501 ReflectionUtils slow down application startup on WebSphere
- Remove synchronization around filteredPropertyDescriptorsCache in case of non-existing entry [SPR-12106] #16722 Remove synchronization around filteredPropertyDescriptorsCache in case of non-existing entry
Referenced from: commits f4062bc, c32d559, 974bd43
Backported to: 3.2.10
0 votes, 8 watchers