# HG changeset patch # User Pierre-Yves David # Date 1711452260 0 # Node ID 1b17eeba9deb66026b5d740904cefb847f0b2872 # Parent 8e2a68e10f5cafbe256b567e840f2d1fb555457a stream-clone: stop getting the file size of all file in v3 The point of v3 is to do less work in the locked section. It was currently not the case. This significantly boost performance. The following number comes from a large private repository using perf::stream-locked-section: base-line: 35.03 seconds this-change: 24.50 seconds (-30%) diff -r 8e2a68e10f5c -r 1b17eeba9deb mercurial/streamclone.py --- a/mercurial/streamclone.py Tue Mar 26 18:55:40 2024 +0000 +++ b/mercurial/streamclone.py Tue Mar 26 11:24:20 2024 +0000 @@ -723,8 +723,8 @@ # create a copy of volatile files for k, vfs, e in entries: for f in e.files(): - f.file_size(vfs) # record the expected size under lock if f.is_volatile: + f.file_size(vfs) # record the expected size under lock copy(vfs.join(f.unencoded_path)) # the first yield release the lock on the repository yield None