Closed
Description
Sargis Harutyunyan opened SPR-11818 and commented
Hi, seems CachedIntrospectionResults caching jar entries and creating big pressure on GC and here is my code:
public static ExaminerWorkloadUpdateWU createExaminerWorkloadUpdateWU(WorkloadCommand workloadCommand) {
ExaminerWorkloadUpdateWU examinerWorkloadUpdateWU = new ExaminerWorkloadUpdateWU(workloadCommand);
DEFAULT_CONTEXT_FACTORY.wire(examinerWorkloadUpdateWU);
return examinerWorkloadUpdateWU;
}
// and
public final void wire(Object bean) {
context.getSpringContext().getAutowireCapableBeanFactory().autowireBean(bean);
}
// and class itself
public class ExaminerWorkloadUpdateWU extends CriterionUpdateWorkUnit<Void> {
// impl. ommited
@Autowired
public void setWorkloadCommandExecutor(WorkloadCommandExecutor workloadCommandExecutor) {
this.workloadCommandExecutor = workloadCommandExecutor;
}
}
Note that actual @Cache
annotation even not applied to target bean I have it in my application but not for target bean.
Also I attached Mission Control recording file and screenshot pointing to CachedIntrospectionResults.
Affects: 3.2.6
Attachments:
- flight_recording_2014-05-25_16_35_42.jfr (538.39 kB)
- spring-3.2.9_flight_recording_2014-05-27_09_33_26.jfr (406.46 kB)
- spring-4.0.5_flight_recording_2014-05-27_09_46_51.jfr (293.19 kB)
- SpringWireAndCacheProblem.png (219.95 kB)
Issue Links:
- Improve the performance of BeanInfo lookups in CachedIntrospectionResults [SPR-9014] #13653 Improve the performance of BeanInfo lookups in CachedIntrospectionResults
- Revisit need for Introspector.flushFromCaches call in CachedIntrospectionResults [SPR-11356] #15981 Revisit need for Introspector.flushFromCaches call in CachedIntrospectionResults