Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-298

Improve how Binary values are created and managed

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • Graph (2.x)
    • Medium

    Description

      The current InMemoryBinaryValueFactory is creating separate InMemoryBinary objects each time 'create(...)' is called. We should have a Binary factory (and corresponding Binary implementations) that caches the in-memory values using the content's hash as a key. While this may slightly degrade performance (since the hash would be computed immediately rather than lazily if needed), it could result in more efficient use of memory. Note that we'd probably have to use weak or soft references inside the Binary object to the cached values, so that as the Binary objects are garbage collected, the cache can remove the unused values.

      Another potential improvement is to store large values on disk, and to memory-map them using direct buffers. This would keep large values (e.g., gigabyte-sized values, such as those used to represent very large files) out of memory.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: