Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3107

Speed up hierarchy cache initialization

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.11, 2.3.2
    • jackrabbit-core, query
    • None

    Description

      Initializing a workspace can take quite a long time if there is a big number of nodes and some search indexes involved. The reason is that the setup of the CachingIndexReader is processed using chunks of a certain size (actually 400K) in order to reduce the memory footprint. As soon as the number of documents exceeds this limit some operations (actually traversing complete indexes) are performed again and again.

      It seems that the current algorithm "initializeParents" in the CachingIndexReader class can't be optimized without increasing the memory consumption. Therefore it should be a promising approach to persist the "state" of this class (actually it's main member array and map) and reload it on startup.

      The "load" of the state can be done implicitly in the initializing phase of the cache. This is obvious. The correct point of time to call the "save" operation isn't obvious at all. I tried the "doClose" method of the class and it seems sufficient.

      Attachments

        1. JCR-3107.patch
          3 kB
          Martin Böttcher

        Activity

          People

            Unassigned Unassigned
            bö Martin Böttcher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: