Open
Description
One can create a memory-mapped store by creating a subclass like this. We may want to add this to the docs. We may also want to graduate _fromfile
to fromfile
class MemoryMappedDirectoryStore(DirectoryStore):
def _fromfile(self, fn):
with open(fn, "rb") as fh:
return memoryview(mmap.mmap(fh.fileno(), 0, prot=mmap.PROT_READ))
xref: #377 (comment)
xref: #377 (comment)