1
0
mirror of https://github.com/restic/restic.git synced 2024-06-27 07:55:08 +02:00
restic/internal/repository
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
..
testdata Moves files 2017-07-23 14:19:13 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
index_test.go add changelog, benchmark, memory calculation 2020-06-14 07:50:15 +02:00
index.go save packIDs and duplicates separately 2020-06-14 07:56:21 +02:00
key.go Allow multiple retries for interactive password input 2019-06-13 20:11:02 +08:00
master_index_test.go repository/master_index: Optimize Index.Lookup() 2018-01-23 22:25:56 -05:00
master_index.go simplify index code 2020-06-14 07:50:19 +02:00
packer_manager_test.go Improve PackerManager benchmark 2020-03-05 22:30:03 +01:00
packer_manager.go Merge pull request #2709 from greatroar/minio-sha256 2020-06-12 23:32:58 +02:00
repack_test.go Fix non-intuitive repository behavior 2020-06-11 13:05:23 +02:00
repack.go Fix non-intuitive repository behavior 2020-06-11 13:05:23 +02:00
repository_test.go Merge pull request #2709 from greatroar/minio-sha256 2020-06-12 23:32:58 +02:00
repository.go Merge pull request #2709 from greatroar/minio-sha256 2020-06-12 23:32:58 +02:00
testing.go Remove remnant of Go 1.9 compatibility code from tests 2020-02-26 22:23:38 +01:00
worker_group.go simpler error return 2020-01-27 18:41:46 +03:00