Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-475

RAMDirectory(Directory dir, boolean closeDir) constructor uses memory inefficiently.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/store
    • Labels:
      None

      Description

      recently I found that RAMDirectory(Directory dir, boolean closeDir) constructor uses memory inefficiently.
      files from source index are read entirely intro memory as single byte array which is after all is thrown away. And if I want to load my 200M optimized, compound format index to memory for faster search I should give JVM at least 400Mb memory limit. For larger indexes this can be an issue.

      I've attached patch how to solve this problem.

        Attachments

        1. RamDirectory.diff
          1 kB
          Volodymyr Bychkoviak
        2. RamDirectory2.diff
          1 kB
          Volodymyr Bychkoviak

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vbychkoviak Volodymyr Bychkoviak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: