Good Afternoon List, I've been looking at how best to save/load SQLite database that is 100% in memory to and from a memory buffer instead of a file via a VFS operating system wrapper. I had initially thought that implementing a Virtual File System (VFS) was a solution but then I realised that would double my memory usage. As I would be holding the pages internally in the VFS and SQLite would also be holding duplicates internally in its page system, as well as another partial set of duplicates in the SQLite page cache.
After thinking about this for a bit, a more efficient implementation could be to save or load the database pages held in SQLite's internal page system. This would effectively involve two new functions being added to the SQLite API: one to seed the page system with pages contained in a supplied buffer (load) and another to copy pages out of the page system and into a buffer (save). I've had a look through the O'Reilly eBook "Inside SQLite" and through the SQLite source code and I think this solution is possible. I would like to know if this approach seems a reasonable solution or not? I would also appreciate any advice about safely modifying the page system that anyone would be able to share. Cheers, Daniel Brown | Software Engineer "The best laid schemes o' mice an' men, gang aft agley" _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users