Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-305

see if creating hundreds of caches for simple tasks is what we want to do

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Minor
    • None
    • 1.4.2
    • API
    • None

    Description

      Hi everyone

      I have some questions about how the caching works in grouper 1.4.2 :
      I have noticed, via visualvm, that a lot of instances of class net.sf.ehcache.Cache are created.
      For instance, if I log in with GrouperSystem and I create a group there are 107 instances of Cache. Then I do the same operation with another user in another browser and there are 151 instances of Cache. And when I look in the debugger there is a lot of creation of CacheManager in the method initialize of the class EhcacheContoller.
      Could you tell me if this is the expected behavior, with the caches associated to the sessions, or if I missed something ?

      Thanks,
      Arnaud.

      Hey Arnaud,

      Thanks for letting us know about this issue.

      > Could you tell me if this is the expected behavior, with the caches
      > associated to the sessions, or if I missed something ?

      Do you mean "is this intended that we create hundreds of caches to do simple tasks"? then I think the answer is no.

      Or do you mean "is this intended behavior to associate caches with GrouperSession"? I think the answer is yes.

      Unfortunately when you initialize an EhCache controller, it will create all caches configured in the config file. And Grouper was designed to have a cache boundary in a GrouperSession, so with each new GrouperSession created, there is a new EhCache controller, and all those dozens of caches.

      We should profile this and see if it is a bottleneck... I added a Jira issue.

      Thanks,
      Chris

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: