make get_mtime_and_size use single stat call for files

This commit is contained in:
pawel
2019-05-29 16:47:13 -07:00
parent a5922ccec1
commit 012e045837
+3 -2
View File
@@ -21,8 +21,9 @@ def get_inode(path):
def get_mtime_and_size(path):
size = os.path.getsize(path)
mtime = os.path.getmtime(path)
stat = os.stat(path)
size = stat.st_size
mtime = stat.st_mtime
if os.path.isdir(path):
for root, dirs, files in dvc_walk(str(path)):