mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
fetch: cache collected
This avoids recollecting the cache files over and over again. For example, `dvc fetch` noop in `dvc-bench` went from ~30sec down to ~10sec for me. Next step is to also cache remote index, so we don't have to waste those ~10sec checking files in the remote. Related https://github.com/iterative/dvc-data/pull/376
This commit is contained in:
@@ -197,8 +197,8 @@ def test_verify_hashes(tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote
|
||||
hash_spy = mocker.spy(dvc_data.hashfile.hash, "file_md5")
|
||||
|
||||
dvc.pull()
|
||||
# NOTE: 1 is for index.data_tree building
|
||||
assert hash_spy.call_count == 2
|
||||
# NOTE: 2 are for index.data_tree building
|
||||
assert hash_spy.call_count == 3
|
||||
|
||||
# Removing cache will invalidate existing state entries
|
||||
dvc.cache.local.clear()
|
||||
@@ -206,7 +206,7 @@ def test_verify_hashes(tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote
|
||||
dvc.config["remote"]["upstream"]["verify"] = True
|
||||
|
||||
dvc.pull()
|
||||
assert hash_spy.call_count == 8
|
||||
assert hash_spy.call_count == 10
|
||||
|
||||
|
||||
@flaky(max_runs=3, min_passes=1)
|
||||
|
||||
Reference in New Issue
Block a user