apache / apache/lucene

MMapDirectory should only mmap large files, small files should be opened using SimpleFS/NIOFS [LUCENE-1743]

Open
#2,817 10 comments 0 reactions 1 assignee Claimed by @uschindler View on GitHub
affects-version:2.9 legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-label:dead legacy-jira-priority:Major module:core/store type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

This is a followup to #2815:
Javadocs state (in FileChannel#map): "For most operating systems, mapping a file into memory is more expensive than reading or writing a few tens of kilobytes of data via the usual read and write methods. From the standpoint of performance it is generally only worth mapping relatively large files into memory."
MMapDirectory should get a user-configureable size parameter that is a lower limit for mmapping files. All files with a size

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.