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

Scheduled/JmsListenerAnnotationBeanPostProcessor free heap space [SPR-15175] #19741

Closed
spring-projects-issues opened this issue Jan 22, 2017 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 22, 2017

Gary Russell opened SPR-15175 and commented

After fixing a similar problem to #16803 in Spring AMQP (AMQP-701), I took a look to see if the same problem exists in the JMS BPP and noticed there is already a fix there by caching nonAnnotatedClasses.

I believe this Set could be cleared in afterSingletonsInstantiated(), freeing up the heap space for these references. It would be at the cost of 1 extra parse for scoped beans that have already been referenced during context initialization.

I took a slightly difference approach in Spring AMQP, by caching the annotated methods and their annotations (with non-annotated classes getting an empty MultiValueMap method list), so I had rather more data after context initialization than just a reference to most bean classes; hence I clear the cache when complete.


Issue Links:

@spring-projects-issues spring-projects-issues added in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 4.3.6 milestone Jan 11, 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) in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants