Rust and mmap

The library is published on crates.io as mmapjsonfile and can help with counting and filtering json files with records all of which as symmetric in their structure ( json array of objects ) as the format below.

[{..}, {..}, ..]

The idea of using memory mapped i/o is check the performance while filtering and creating another file etc from rust while putting serde in harmsway :grin:.

Here is the best read on the topic from Linux forums.

Functionality

Test

The airports JSON has been taken from the location. It needs to be downloaded and put in the data/ directory.

Thanks to the original mmap lib.

General performance seems to be of the order below.

( all tests below are run in a macbook )

cargo test --release -- --nocapture --test-threads 1

Debug
Release (16MB json - 57,265 records)
Release (1.1 GB - appended 16MB json multiple times - 4,065,815 records)