imag/lib/core/libimagstore
Matthias Beyer 8b508fe4c3 Optimize backend impl to not hold open files
This patch changes the filesystem-backend implementation of libimagstore
to open files on each read/write rather than holding the file handle in
memory at all times.

Whenever a lot of imag store entries are read into memory, the imag
process may ran out of file descriptors. With this patch applied, a
`Store::get()` call on an entry which is not yet in the store cache
would cause the file to be read, but the FD being dropped after that.
Likewise, a `Store::update()` (which is also called if the imag entry is
dropped) would re-open the file on the filesystem and write the contents
from the imag store cache back to the file.

With this patch, opening hundrets or thousands of imag entries should be
no problem anymore, only the available memory should be a limit then.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2018-08-11 17:50:22 +02:00
..
src Optimize backend impl to not hold open files 2018-08-11 17:50:22 +02:00
.gitignore Reorganize code in subdirs 2017-08-27 15:12:09 +02:00
Cargo.toml Update version string: 0.8.0 -> 0.9.0 2018-05-09 11:39:33 +02:00
README.md Fix broken README symlinks 2017-08-27 15:13:25 +02:00

libimagstore

The store is the heart of everything. Here lives the data, the complexity and the performance bottleneck.

The store offeres read/write access to all entries.

The store itself does not offer functionality, but has a commandline interface "imag-store" which can do basic things with the store.

Long-term TODO

  • Merge with libimagrt