Skip to content

CachedIntrospectionResults caching jar entries and creating big pressure on GC [SPR-11818] #16438

Closed

Description

@spring-projects-issues

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:

Issue Links:

Activity

  1. spring-projects-issues commented on May 26, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Have you had a chance to test this against 3.2.9 and/or 4.0.5 as well? There has been quite a bit of fine-tuning in that space lately... You might nevertheless see the same effect but it'd be helpful to verify against those most recent releases.

    Juergen

  2. spring-projects-issues commented on May 27, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Sargis Harutyunyan commented

    Hi I tested with 3.2.9 and problem still exists but with 4.0.5 it works fine and memory allocation is low also, I will attach 'Flight Recorder' for both cases can be useful

  3. spring-projects-issues commented on May 27, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    This looks like a consequence of #15981 then, which we addressed as of 4.0.1. Since we have a dependency on JDK 6 and even a specific JDK update level there, we can't easily backport this to the 3.2.x line, I'm afraid. So the generally improved behavior is a 4.x only characteristic.

    That said, we did introduce a "spring.beaninfo.ignore" property in 4.0.1 and 3.2.7 - see #13653. Setting that to "true" (as a system property or in a spring.properties file) will suppress the entire Introspector BeanInfo handling, which might optimize the GC load in your scenario. This is the only option in that problem space that's available in 3.2.x line as well.

    Juergen

  4. spring-projects-issues commented on May 27, 2014

    @spring-projects-issues
    CollaboratorAuthor

    Sargis Harutyunyan commented

    Okay, thanks a lot.

  5. added
    type: bug
    in: core
    on Jan 11, 2019
  6. added this to the 4.0.1 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coretype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions