I know, that zimlib uses quite some memory. It has a decompress cache for
articles and a cache for directory entries. It caches
up to 16 chunks,
are normally 1M and 512 directory entries (some few bytes each). To reduce
memory consumption the directory cache is not so important but the
cache is. Currently this 16 is a fixed size (defined in src/fileimpl.cpp).
It is a quite bad solution to hard code that value but to add a "--low-
memory"-flag and compile a smaller value into the lib is not really a very
option. It would be better to either let the user of the library decide or
use e.g. a environment variable to tune it. I'm not sure, what is the best
What do you think? The library may read the value from the env variable
ZIM_CLUSTERCACHE and ZIM_DIRENTCACHE and default to the values above. Then
size is configurable without recompilation.
As I am not really a coder I won't go into details about how to implement a
low memory version :) I'll leave that to the other Mirko.
I was more wondering if you had a device with limited resources that you use
If not, would it be helpful if I'd send you a NanoNote with a pre-flashed
image that you could use for testing?
(Getting an environment set up that allows you to rebuild the openZIM
programs should be an easy fix)
Or are you uber busy with your day job at the moment?