Scheduled/JmsListenerAnnotationBeanPostProcessor free heap space [SPR-15175] #19741
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
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:
The text was updated successfully, but these errors were encountered: