2
2
mirror of https://github.com/octoleo/restic.git synced 2025-02-02 20:08:25 +00:00
restic/internal
Alexander Weiss ce4a2f4ca6 save packIDs and duplicates separately
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.
2020-06-14 07:56:21 +02:00
..
2020-01-27 18:28:21 +03:00
2020-04-18 17:39:06 +02:00
2018-10-11 19:40:38 +02:00
2020-05-12 11:30:41 +02:00
2020-04-29 10:57:01 +02:00
2018-05-22 20:48:17 +02:00
2019-04-13 13:38:39 +02:00
2019-06-30 23:56:36 +03:00
2018-05-01 14:38:59 +02:00