From 392bc3e3b133fad22e3d3acce61f2efc55800df6 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 12 Apr 2020 00:22:07 +0200 Subject: [PATCH] fuse: hot-spot micro-opt for versions view this way it does not create/discard tons of lists --- src/borg/fuse.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/borg/fuse.py b/src/borg/fuse.py index 78596bcd8..de0dda520 100644 --- a/src/borg/fuse.py +++ b/src/borg/fuse.py @@ -362,8 +362,7 @@ def file_version(item, path): file_id = blake2b_128(path) current_version, previous_id = self.versions_index.get(file_id, (0, None)) - chunk_ids = [chunk_id for chunk_id, _, _ in item.chunks] - contents_id = blake2b_128(b''.join(chunk_ids)) + contents_id = blake2b_128(b''.join(chunk_id for chunk_id, _, _ in item.chunks)) if contents_id != previous_id: current_version += 1