Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-557

LRUMap memory usage vs size

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 4.1
    • Component/s: Map
    • Labels:

      Description

      Hello,
      Currently LRUMap uses maxSize parameter to configure its maxSize.
      This is not great for its memory usage.

      For example I have a use case where I can't really guess the target maxSize of LRUMap so I have put a big number .
      In reality I end up having 380 elements but LRUMap uses 33 Mb of memory because it allocates (as capacity) LOAD_FACTORxsupposed max size.

      It would be nice to have the possibility to set maxSize apart making it unrelated to capacity.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pmouawad Philippe Mouawad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: