浏览代码

cache: explain fetch_missing_csize cost

Marian Beermann 8 年之前
父节点
当前提交
4689fd0c22
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/borg/cache.py

+ 2 - 0
src/borg/cache.py

@@ -656,6 +656,8 @@ class LocalCache(CacheStatsMixin):
             else:
             else:
                 fetch_ids = all_missing_ids
                 fetch_ids = all_missing_ids
 
 
+            # This is potentially a rather expensive operation, but it's hard to tell at this point
+            # if it's a problem in practice (hence the experimental status of --no-cache-sync).
             for id_, data in zip(fetch_ids, decrypted_repository.repository.get_many(fetch_ids)):
             for id_, data in zip(fetch_ids, decrypted_repository.repository.get_many(fetch_ids)):
                 entry = chunk_idx[id_]._replace(csize=len(data))
                 entry = chunk_idx[id_]._replace(csize=len(data))
                 chunk_idx[id_] = entry
                 chunk_idx[id_] = entry