Skip to content

Commit

Permalink
import/get: optimize LFS prefetching (#10414)
Browse files Browse the repository at this point in the history
  • Loading branch information
sisp authored May 3, 2024
1 parent 0a8a9de commit a7c0f6e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dvc/fs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ def download(
to_infos = [to]

if isinstance(fs, DVCFileSystem):
lfs_prefetch(fs, from_infos)
lfs_prefetch(
fs, [f"{fs.normpath(fs_path)}/**" if fs.isdir(fs_path) else fs_path]
)
cb.set_size(len(from_infos))
jobs = jobs or fs.jobs
generic.copy(fs, from_infos, localfs, to_infos, callback=cb, batch_size=jobs)
Expand Down

0 comments on commit a7c0f6e

Please sign in to comment.