{"thread":{"id":"4385","subject":"git clone takes ages on a slow link","startedAt":"2006-06-04T01:01:45Z","lastAt":"2006-06-04T22:29:02Z","messageCount":3,"participants":["Anton Blanchard","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"21177","messageId":"20060604010145.GC986@krispykreme","threadId":"4385","inReplyTo":null,"subject":"git clone takes ages on a slow link","fromName":"Anton Blanchard","fromEmail":"anton@samba.org","sentAt":"2006-06-04T01:01:45Z","receivedAt":"2006-06-04T01:01:45Z","isPatch":false,"sender":{"key":"anton@samba.org","avatar":null},"body":"\nHi,\n\nI tried cloning a local repository when connected over a slow (1 second+\nlatency) link. It took forever (I gave up after 10 minutes). If I ran\nit in the background it took a few seconds.\n\nI think the ticker is over anxious.\n\n# git clone -l linux-2.6 linux-2.6-test\n0 blocks\nChecking files out...\n   5% (1060/19552) done\t\t\t<---- performance bottleneck\n\nAnton\n"},{"id":"21211","messageId":"Pine.LNX.4.64.0606041046340.5498@g5.osdl.org","threadId":"4385","inReplyTo":"20060604010145.GC986@krispykreme","subject":"Re: git clone takes ages on a slow link","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-06-04T17:48:31Z","receivedAt":"2006-06-04T17:48:31Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sun, 4 Jun 2006, Anton Blanchard wrote:\n> \n> I think the ticker is over anxious.\n\nIt is indeed. It's _meant_ to only tick once a second or when the \npercentage changes, but I think it forgot to clear the \"once a second \nhappened\" flag, so instead of updates the percentage output for every \nfile it checks out after the first second has passed.\n\nSo something like this should help... Can you verify?\n\n\t\tLinus\n---\ndiff --git a/builtin-read-tree.c b/builtin-read-tree.c\nindex 716f792..80c9320 100644\n--- a/builtin-read-tree.c\n+++ b/builtin-read-tree.c\n@@ -336,6 +336,7 @@ static void check_updates(struct cache_e\n \t\t\t\t\tfprintf(stderr, \"%4u%% (%u/%u) done\\r\",\n \t\t\t\t\t\tpercent, cnt, total);\n \t\t\t\t\tlast_percent = percent;\n+\t\t\t\t\tprogress_update = 0;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n"},{"id":"21231","messageId":"20060604222901.GD986@krispykreme","threadId":"4385","inReplyTo":"Pine.LNX.4.64.0606041046340.5498@g5.osdl.org","subject":"Re: git clone takes ages on a slow link","fromName":"Anton Blanchard","fromEmail":"anton@samba.org","sentAt":"2006-06-04T22:29:02Z","receivedAt":"2006-06-04T22:29:02Z","isPatch":false,"sender":{"key":"anton@samba.org","avatar":null},"body":"\nHi Linus,\n\n> It is indeed. It's _meant_ to only tick once a second or when the \n> percentage changes, but I think it forgot to clear the \"once a second \n> happened\" flag, so instead of updates the percentage output for every \n> file it checks out after the first second has passed.\n> \n> So something like this should help... Can you verify?\n\nThanks, it fixes it.\n\nAnton\n\n> diff --git a/builtin-read-tree.c b/builtin-read-tree.c\n> index 716f792..80c9320 100644\n> --- a/builtin-read-tree.c\n> +++ b/builtin-read-tree.c\n> @@ -336,6 +336,7 @@ static void check_updates(struct cache_e\n>  \t\t\t\t\tfprintf(stderr, \"%4u%% (%u/%u) done\\r\",\n>  \t\t\t\t\t\tpercent, cnt, total);\n>  \t\t\t\t\tlast_percent = percent;\n> +\t\t\t\t\tprogress_update = 0;\n>  \t\t\t\t}\n>  \t\t\t}\n>  \t\t}\n"}]}