libbitcoin/libbitcoin-database

Resize files to logical size before closing.

evoskuil opened this issue · 1 comments

There is a programmed 150% growth for each allocation that exceeds the file size. This results in an average ~125% excess of the necessary file size for each file upon shutdown. It's easy and reasonably fast to trim the files back to logical size. There is a small cost at shutdown and upon first write after startup. For the same reason, do not create files initially with expanded sizes (initchain).

Implemented.