Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use less memory and try to skip more classes when processing @Configuration classes #22563

Closed
Tracked by #22560
philwebb opened this issue Mar 11, 2019 · 0 comments
Closed
Tracked by #22560
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

The ConfigurationClassParser often ends up creating a new SourceClass instance for Object.class. We could use a static to represent this and save ourselves a few object allocations.

The asSourceClass method is also often called with java.lang.annotation instances which can always be skipped.

@philwebb philwebb self-assigned this Mar 11, 2019
@philwebb philwebb added the type: enhancement A general enhancement label Mar 11, 2019
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Mar 12, 2019
@jhoeller jhoeller added this to the 5.2 M1 milestone Mar 12, 2019
philwebb added a commit to philwebb/spring-framework that referenced this issue Mar 13, 2019
Update `ConfigurationClassParser` to skip `java.lang.annotation` types
which were often processed but would never provide useful results. Also
use a single shared immutable `SourceClass` instance to represent
`Object.class`.

Closes spring-projectsgh-22563
philwebb added a commit to philwebb/spring-framework that referenced this issue Mar 13, 2019
Update `ConfigurationClassParser` to skip `java.lang.annotation` types
which were often processed but would never provide useful results. Also
use a single shared immutable `SourceClass` instance to represent
`Object.class`.

Closes spring-projectsgh-22563
philwebb added a commit to philwebb/spring-framework that referenced this issue Mar 13, 2019
Update `ConfigurationClassParser` to skip `java.lang.annotation` types
which were often processed but would never provide useful results. Also
use a single shared immutable `SourceClass` instance to represent
`Object.class`.

Closes spring-projectsgh-22563
snicoll pushed a commit to snicoll/spring-framework that referenced this issue Mar 13, 2019
Update `ConfigurationClassParser` to skip `java.lang.annotation` types
which were often processed but would never provide useful results. Also
use a single shared immutable `SourceClass` instance to represent
`Object.class`.

Closes spring-projectsgh-22563
philwebb added a commit to philwebb/spring-framework that referenced this issue Mar 14, 2019
Update `ConfigurationClassParser` to skip `java.lang.annotation` types
which were often processed but would never provide useful results. Also
use a single shared immutable `SourceClass` instance to represent
`Object.class`.

Closes spring-projectsgh-22563
@sbrannen sbrannen changed the title Use less memory and be try to skip more classes when processing @Configuration classes Use less memory and try to skip more classes when processing @Configuration classes Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants