Commons JCS
  1. Commons JCS
  2. JCS-3

File Optimization expensive in memory and disk space

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: jcs-1.2.7.9
    • Component/s: Indexed Disk Cache
    • Labels:
      None
    • Environment:
      Any

      Description

      The file optimization for the IndexedDiskCache creates a duplicate of the cache file. In deployments with large volumes of data this doubling of disk usage can be problematic. If this could be done inside the single file, it would be easier on the disk.

      Additionally, OutOfMemoryErrors are common due to the deserializing and reserializing of the objects in the cache. Given the the size in bytes of each object in the file is known (it's part of the record), the objects could be moved in the file without recreating an instance of the object in memory. The use of a single buffer for reading and then writing the data (to either the same file or a new one) would be much more efficient for handling this optimization.

      1. StandardSerializer.java
        2 kB
        Peter Schwarz
      2. IndexedDiskElementDescriptor.java
        2 kB
        Peter Schwarz
      3. IndexedDisk.java
        8 kB
        Peter Schwarz
      4. IndexedDiskCache.java
        42 kB
        Peter Schwarz
      5. IndexedDiskDumper.java
        2 kB
        Peter Schwarz
      6. indexed-disk.patch
        73 kB
        Peter Schwarz
      7. indexed-disk.patch
        73 kB
        Peter Schwarz

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Aaron Smuts
              Reporter:
              Peter Schwarz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development