[
https://issues.apache.org/jira/browse/LUCENE-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173255#comment-13173255
]
Robert Muir commented on LUCENE-3659:
-------------------------------------
I actually think heap versus direct is just an optimization (and ideally would
just be an option, in my opinion not the default).
The problem is mostly tiny buffers.
I think a good idea is to rename MMapIndexInput to ByteBufferIndexInput, it
does not really care if something is mapped or not, it has all the logic for
dealing with multiple fixed-size buffers.
And RAMDirectory could then just use 1MB shift by default (normal heap
array-backed buffers). Sure it wastes at most 1MB for tiny files but the
RAMFile is wasteful today too.
Down the road we could optimize this: e.g. add IOContext.METADATA for tiny
files (segments.gen, .fnm, segments_N, .per, etc), and RAMDir could use say a
256KB shift there and 4MB otherwise. This iocontext flag could also be used if
someone didnt want to MMap tiny-files too.
> Improve Javadocs of RAMDirectory to document its limitations
> ------------------------------------------------------------
>
> Key: LUCENE-3659
> URL: https://issues.apache.org/jira/browse/LUCENE-3659
> Project: Lucene - Java
> Issue Type: Task
> Affects Versions: 3.5, 4.0
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.6, 4.0
>
>
> Spinoff from several dev@lao issues:
> -
> [http://mail-archives.apache.org/mod_mbox/lucene-dev/201112.mbox/%3C001001ccbf1c%2471845830%24548d0890%24%40thetaphi.de%3E]
> - issue LUCENE-3653
> The use cases for RAMDirectory are very limited and to prevent users from
> using it for e.g. loading a 50 Gigabyte index from a file on disk, we should
> improve the javadocs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]