Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-71

Caching primitive array types consumes excessive memory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.9.6
    • 0.9.7
    • datacache
    • None

    Description

      As reported on the mailing list: http://www.nabble.com/cached-byte---consumes-excessive-memory-tf2543098.html , in org.apache.openjpa.AbstractPCData#toData() an ArrayList is used to cache all types of arrays, including arrays of primitives. This can use excessively large amounts of memory because of the wrappers required for each element in the array. In one test case, a 7MB byte[] consumed 127MB when converted to a cached ArrayList.

      AbstractPCData needs to be fixed to handle simple arrays.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rogerkeays Roger Keays
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: