Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-2292

New method - Store.free(int) would increase performance and lower memory consumption

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • * Cocoon Core
    • None

    Description

      Store.free() method is invoked in loop by StoreJanitor, this usually lead to slow execution of cache freeing. For example, EHDefaultStore has a free method implemented as:
      ...
      final List keys = this.cache.getKeysNoDuplicateCheck();
      if (!keys.isEmpty()) {
      final Serializable key = (Serializable) keys.get(0);
      ...

      Where method getKeysNoDuplicateCheck() takes quite some time (and memory) and is dependent on the size of memory and disk stores. Because free() is run in loop this method is invoked each time! If free(int) method would exists, then each store could implement it in an optimal way.

      Attachments

        Activity

          People

            Unassigned Unassigned
            krzysztof Krzysztof Kowalczyk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: