From 9e60d6e2cfad8288f88307c919475306d00d762c Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 12 Feb 2017 19:33:15 +0200 Subject: Early break if chunks_to_remove becomes empty --- obnamlib/fmt_ga/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/obnamlib/fmt_ga/client.py b/obnamlib/fmt_ga/client.py index 0427fc31..a22c3419 100644 --- a/obnamlib/fmt_ga/client.py +++ b/obnamlib/fmt_ga/client.py @@ -236,6 +236,8 @@ class GAClient(object): for chunk_id in self._generate_chunk_ids_in_generations(remaining): if chunk_id in chunks_to_remove: chunks_to_remove.remove(chunk_id) + if len(chunks_to_remove) == 0: + break dumper.dump_memory_profile('after computing chunk uniq to removed gen') self._generations.set_generations(remaining) -- cgit v1.2.1