[dna-issues] [JBoss JIRA] Created: (DNA-261) Improve how Binary values are created and managed

Randall Hauch (JIRA) jira-events at lists.jboss.org
Sun Nov 23 11:53:36 EST 2008


Improve how Binary values are created and managed
-------------------------------------------------

                 Key: DNA-261
                 URL: https://jira.jboss.org/jira/browse/DNA-261
             Project: DNA
          Issue Type: Feature Request
          Components: Graph
            Reporter: Randall Hauch
            Priority: Minor
             Fix For: 0.4


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.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the dna-issues mailing list