Announcement Announcement Module
No announcement yet.
AnnotationTransactionAttributeSource takes a lot of memory Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • AnnotationTransactionAttributeSource takes a lot of memory


    i've just run MemoryAnalyser on my project and i see that AnnotationTransactionAttributeSource takes 16 Mo on a total of 78 Mo , which represent 20 % of all the memory of the application...

    Is it normal ? Is this class used at runtime or just for launching ? Is it possible to downsize the consumption of this class ?

  • #2
    There isn't much in there which keeps state at least not in the version I checked. Which spring version are you using and try to be a bit more specific on where the memory is being consumed, there must be some informatin in the internals.


    • #3
      more details

      Spring version : 2.5.5

      org.springframework.transaction.annotation.Annotat ionTransactionAttributeSource @ 0x8286c70 => Retained Heap = 15 994 664
      java.util.concurrent.ConcurrentHashMap @ 0x82b0788 => => Retained Heap = 15 994 456

      it seems to be "attributeCache"...


      • #4
        Over looked that one it is in the super class .

        Well that is the method cache for all transactional methods in your project, you could probably create a non caching implementation but that would be probably have a severe impact on performance.

        However I would suggest that you entered a jira issue maybe Juergen can find a way to decrece the amount of memory used.