mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
ce4a2f4ca6
A side remark to the definition of Index.blob: Another possibility would have been to use: blob map[restic.BlobHandle]*indexEntry This would have led to the following sizes: key: 32 + 1 = 33 bytes value: 8 bytes indexEntry: 8 + 4 + 4 = 16 bytes each packID: 32 bytes To save N index entries, we would therefore have needed: N * OF * (33 + 8) bytes + N * 16 + N * 32 bytes / BP = N * 82 bytes More precicely, using a pointer instead of a direct entry is the better memory choice if: OF * 8 bytes + entrysize < OF * entrysize <=> entrysize > 8 bytes * OF/(OF-1) Under the assumption of OF=1.5, this means using pointers would have been the better choice if sizeof(indexEntry) > 24 bytes. |
||
---|---|---|
.. | ||
testdata | ||
doc.go | ||
index_test.go | ||
index.go | ||
key.go | ||
master_index_test.go | ||
master_index.go | ||
packer_manager_test.go | ||
packer_manager.go | ||
repack_test.go | ||
repack.go | ||
repository_test.go | ||
repository.go | ||
testing.go | ||
worker_group.go |