SQLite memory mapping comment
arthur-tacca opened this issue · 2 comments
Hi, not sure if this is the right place for comments. I notice you mention:
Uses memory mapping instead of read/write calls when db is < mmap_size.
Maybe I misread it, but I took this to mean "when total database size > mmap_size, the memory mapping would not be used at all". I later found out the memory mapping will still be used, but only for the starting bytes of the database up to mmap_size, so it can still give some performance benefit. It also might be worth noting a warning from the SQLite documentation: if a read fails (e.g. USB stick pulled out of drive), then you'll get a signal or crash rather than a graceful read error! But that's OK for some applications.
Missed this comment, sorry. You're right, I'll adjust it.
I've added more text to the memory mapping session to make this clearer, thanks again.