mirror of
https://github.com/restic/restic.git
synced 2026-11-18 11:51:23 +00:00
index: support incremental index loading
Do not require a full index reload if only a few additional index files have been added. This can drastically speed up loading the index in the mount command.
This commit is contained in:
1 parent
b24d210b45
commit
4c0dc9e202
4 files changed
+99
-7
No files matched your search
@@ -26,7 +26,9 @@ func NewCounter(interval time.Duration, total uint64, report Func) *Counter {
|
||||
c.max.Store(total)
|
||||
c.Updater = *NewUpdater(interval, func(runtime time.Duration, final bool) {
|
||||
v, maxV := c.Get()
|
||||
report(v, maxV, runtime, final)
|
||||
if report != nil {
|
||||
report(v, maxV, runtime, final)
|
||||
}
|
||||
})
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user