You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Revisit class cache in CachedIntrospectionResults [SPR-11867] #16486
I'm doing performance tuning with Grails 2.4.1.BUILD-SNAPSHOT which uses Spring 4.0.5 .
The main principle for performance tuning in Grails is to minimize all blocking. I rely on the profiler information about what's causing the most blocking.
In my performance test , this is a very minor source of blocking compared to #16482 (the relative amount of blocking this causes is not even comparable). YMMV :)
Do you know what this does and do you really need this? I know this may not fix the actual performance issue you found but you can disable it (see #13653)
CachedIntrospectionResults, GenericTypeAwarePropertyDescriptor and BeanUtils consistently avoid synchronization now. This is a little bit risky since we're using our ConcurrentReferenceHashMap in those very hotspot places now, which is why this is not really a candidate for backporting. Let's rather use the 4.1 release candidate phase to have this tested in many scenarios.
As a side effect, through ConcurrentReferenceHashMap, we're using soft references for non-cache-safe bean classes now. Previously, we used weak references even for the CachedIntrospectionResults reference which led to rather aggressive garbage collection effects. We should consider changing that part to soft references in 4.0.6 and 3.2.10 as well, simply storing them in the existing WeakHashMap there.
Activity
spring-projects-issues commentedon Jun 11, 2014
Lari Hotari commented
In my performance test , this is a very minor source of blocking compared to #16482 (the relative amount of blocking this causes is not even comparable). YMMV :)
spring-projects-issues commentedon Jun 12, 2014
Stéphane Nicoll commented
Do you know what this does and do you really need this? I know this may not fix the actual performance issue you found but you can disable it (see #13653)
spring-projects-issues commentedon Jun 29, 2014
Juergen Hoeller commented
CachedIntrospectionResults, GenericTypeAwarePropertyDescriptor and BeanUtils consistently avoid synchronization now. This is a little bit risky since we're using our ConcurrentReferenceHashMap in those very hotspot places now, which is why this is not really a candidate for backporting. Let's rather use the 4.1 release candidate phase to have this tested in many scenarios.
As a side effect, through ConcurrentReferenceHashMap, we're using soft references for non-cache-safe bean classes now. Previously, we used weak references even for the CachedIntrospectionResults reference which led to rather aggressive garbage collection effects. We should consider changing that part to soft references in 4.0.6 and 3.2.10 as well, simply storing them in the existing WeakHashMap there.
Juergen
spring-projects-issues commentedon Jul 1, 2014
Juergen Hoeller commented
Backporting the change to SoftReference values as mentioned above. The synchronization-free use of ConcurrentReferenceHashMap remains 4.1 only.
Juergen