Uploaded image for project: 'Commons JCS'
  1. Commons JCS
  2. JCS-3

File Optimization expensive in memory and disk space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • jcs-1.2.7.9
    • Indexed Disk Cache
    • None
    • 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.

      Attachments

        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

            People

              asmuts Aaron Smuts
              peter.schwarz Peter Schwarz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: