On Tue, 16 Dec 2008 20:18:19 +0100
Xavier
What about the disk space usage, compared to a simple tar file? Did you ever consider the idea of reading directly tar.gz or reading/writing directly tar, knowing we already have the libarchive dependency.
Well, if I understand tar files correctly, tar files require files to be
stored in one continous chunk. If you want to update a file, and it
gets bigger than it already is, you would have to move the whole file
to the end of the archive. So while tar archives would work great for
the sync db's that doesn't get modified, it would be hard to do for the
local db, unless you rewrote the complete database every time you
modified it. Now keeping two separate database formats for the sync
and the local database seems a bit weird to me. As for the size:
extra.db.tar: 5.3 mb
extra.db (packed): 5.0 mb
This is probably because the packed format uses 256 byte blocks, while
tar uses 512 byte blocks, leading to less waste on small files in the
packed format.
--
Sivert Berg