mercurial/streamclone.py
changeset 51548 6e4c8366c5ce
parent 51547 463e63aa547c
child 51549 49faa72b994e
--- a/mercurial/streamclone.py	Tue Mar 26 13:32:46 2024 +0000
+++ b/mercurial/streamclone.py	Tue Mar 26 13:34:05 2024 +0000
@@ -850,7 +850,10 @@
     - ways to adjust the number of expected entries/files ?
     """
 
-    with repo.lock():
+    # Python is getting crazy at all the small container we creates while
+    # considering the files to preserve, disabling the gc while we do so helps
+    # performance a lot.
+    with repo.lock(), util.nogc():
 
         repo.ui.debug(b'scanning\n')