Optimize pack readHeader() implementation

Load pack header length and 15 header entries with single backend
request. This eliminates separate header Load() request for most pack
files and significantly improves index.New() performance.

Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
This commit is contained in:
Igor Fedorenko
2018-01-23 18:51:22 -05:00
parent b63de7c798
commit 953f3d55ee
3 changed files with 88 additions and 26 deletions

View File

@@ -0,0 +1,7 @@
Enhancement: Reduce number of remote requests reading pack header
This change eliminates extra remote repository calls for most pack
files and improves repository reindex and purge time.
https://github.com/restic/restic/issues/1567
https://github.com/restic/restic/pull/1574