Elaborate on "Calculating size" (#4866)

create: tell that "Calculating size" time and space needs are caused by --progress

It took me several days to figure out that `--progress` was the culprit to Borg being SIGKILL'd by the kernel, because of OOM, and because of I enabled progress option. This elaborates on what's the calculation for.
This commit is contained in:
Birkhoff Lee 2019-12-16 06:05:40 +08:00 committed by TW
parent c209eff842
commit 5739602a11
1 changed files with 1 additions and 1 deletions

View File

@ -778,7 +778,7 @@ class Archiver:
filter = self.build_filter(matcher, peek_and_store_hardlink_masters, strip_components)
if progress:
pi = ProgressIndicatorPercent(msg='%5.1f%% Extracting: %s', step=0.1, msgid='extract')
pi.output('Calculating size')
pi.output('Calculating total archive size for the progress indicator (might take long for large archives)')
extracted_size = sum(item.get_size(hardlink_masters) for item in archive.iter_items(filter))
pi.total = extracted_size
else: