git clone takes ages on a slow link
Hi,
I tried cloning a local repository when connected over a slow (1 second+ latency) link. It took forever (I gave up after 10 minutes). If I ran it in the background it took a few seconds.
I think the ticker is over anxious.
# git clone -l linux-2.6 linux-2.6-test 0 blocks Checking files out... 5% (1060/19552) done <---- performance bottleneck
Anton
Quoted 2 lines · Anton Blanchard
I think the ticker is over anxious.
It is indeed. It's _meant_ to only tick once a second or when the percentage changes, but I think it forgot to clear the "once a second happened" flag, so instead of updates the percentage output for every file it checks out after the first second has passed.
So something like this should help... Can you verify?
Linus
---
builtin-read-tree.c +1 -0
@@ -336,6 +336,7 @@ static void check_updates(struct cache_efprintf (stderr,"%4u%% (%u/%u) done\r" , percent, cnt, total); last_percent = percent; + progress_update =0 ; } } }
Hi Linus,
Quoted 6 lines
It is indeed. It's _meant_ to only tick once a second or when the percentage changes, but I think it forgot to clear the "once a second happened" flag, so instead of updates the percentage output for every file it checks out after the first second has passed.
So something like this should help... Can you verify?
Thanks, it fixes it.
Anton
Quoted 12 lines
builtin-read-tree.c +1
-0@@ -336,6 +336,7 @@ static void check_updates(struct cache_efprintf (stderr,"%4u%% (%u/%u) done\r" , percent, cnt, total); last_percent = percent; + progress_update =0 ; } } }