diff --git a/dvc/remote/local/__init__.py b/dvc/remote/local/__init__.py index 311309261..45b1e4bbe 100644 --- a/dvc/remote/local/__init__.py +++ b/dvc/remote/local/__init__.py @@ -383,8 +383,12 @@ class RemoteLOCAL(RemoteBase): return ret def _fill_statuses(self, checksum_info_dir, local_exists, remote_exists): + # Using sets because they are way faster for lookups + local = set(local_exists) + remote = set(remote_exists) + for md5, info in checksum_info_dir.items(): - status = STATUS_MAP[(md5 in local_exists, md5 in remote_exists)] + status = STATUS_MAP[(md5 in local, md5 in remote)] info["status"] = status def _get_chunks(self, download, remote, status_info, status, jobs):