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

spring-projects-issues opened this issue Jan 22, 2017 · 0 comments
in: core in: messaging type: enhancement


Copy link

@spring-projects-issues 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:

  • #16803 Scheduled/JmsListenerAnnotationBeanPostProcessor needlessly scans every scoped instance
  • AMQP-701 Bean creation slow
@spring-projects-issues spring-projects-issues added in: messaging type: enhancement in: core 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
in: core in: messaging type: enhancement
None yet

No branches or pull requests

2 participants