mirror of
https://github.com/octoleo/restic.git
synced 2025-01-30 18:38:49 +00:00
repository: MasterIndex.Packs: reduce allocations
This commit is contained in:
parent
6ff9517e45
commit
77b1980d8e
@ -150,7 +150,7 @@ func (mi *MasterIndex) Packs(packBlacklist restic.IDSet) restic.IDSet {
|
||||
packs := restic.NewIDSet()
|
||||
for _, idx := range mi.idx {
|
||||
idxPacks := idx.Packs()
|
||||
if idx.final {
|
||||
if idx.final && len(packBlacklist) > 0 {
|
||||
idxPacks = idxPacks.Sub(packBlacklist)
|
||||
}
|
||||
packs.Merge(idxPacks)
|
||||
|
Loading…
x
Reference in New Issue
Block a user