mirror of
https://github.com/restic/restic.git
synced 2025-05-11 05:06: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()
|
packs := restic.NewIDSet()
|
||||||
for _, idx := range mi.idx {
|
for _, idx := range mi.idx {
|
||||||
idxPacks := idx.Packs()
|
idxPacks := idx.Packs()
|
||||||
if idx.final {
|
if idx.final && len(packBlacklist) > 0 {
|
||||||
idxPacks = idxPacks.Sub(packBlacklist)
|
idxPacks = idxPacks.Sub(packBlacklist)
|
||||||
}
|
}
|
||||||
packs.Merge(idxPacks)
|
packs.Merge(idxPacks)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user