On Wednesday, 19 April 2017 at 19:30:03 UTC, Thomas Brix Larsen wrote:
On Wednesday, 19 April 2017 at 18:24:46 UTC, Jay Norwood wrote:
[...]

Ok, thanks. I took a look at several capnproto implementations just now, and didn't see any tests for a mmap 'feature'. The roadmap doc below indicates it doesn't exist, and perhaps there are some details yet to be resolved to make it 'friendly' for a mmap.

But reading using random access *is* a feature of Cap'n Proto. So when reading a memory mapped Cap'n Proto file, getters will be faster if you use it in a non-sequential way.


I have made some minor changes to make adaptors responsible for allocating buffers. This made it possible to add a new adaptor MemoryMapped and a sample[1] to show it off.

I have also verified that no buffer allocations happen while reading using MemoryMapped.

Note that writing using memory mapping is still not possible.

[1]: https://github.com/ThomasBrixLarsen/capnproto-dlang/blob/master/source/samples/mmap.d

Reply via email to