mirror of
https://github.com/restic/restic.git
synced 2026-06-25 18:14:17 +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:
@@ -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