All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fetch-pack: grow stateless RPC windows exponentially
@ 2016-07-18 18:36 Jonathan Tan
  2016-07-18 18:55 ` Jonathan Nieder
  0 siblings, 1 reply; 17+ messages in thread
From: Jonathan Tan @ 2016-07-18 18:36 UTC (permalink / raw)
  To: git; +Cc: Jonathan Tan, jrnieder, sbeller

When updating large repositories, the LARGE_FLUSH limit (that is, the
limit at which the window growth strategy switches from exponential to
linear) is reached quite quickly. Use a conservative exponential growth
strategy when that limit is reached instead.

This optimization is only applied during stateless RPCs to avoid the
issue raised and fixed in commit
44d8dc54e73e8010c4bdf57a422fc8d5ce709029.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
 fetch-pack.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fetch-pack.c b/fetch-pack.c
index b501d5c..3fcbda2 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -251,6 +251,8 @@ static int next_flush(struct fetch_pack_args *args, int count)
 
 	if (count < flush_limit)
 		count <<= 1;
+	else if (args->stateless_rpc && count >= flush_limit * 10)
+		count = count * 11 / 10;
 	else
 		count += flush_limit;
 	return count;
-- 
2.8.0.rc3.226.g39d4020


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-07-20 13:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 18:36 [PATCH] fetch-pack: grow stateless RPC windows exponentially Jonathan Tan
2016-07-18 18:55 ` Jonathan Nieder
2016-07-18 19:10   ` Junio C Hamano
2016-07-18 19:16     ` Jonathan Tan
2016-07-18 19:31       ` Jonathan Nieder
2016-07-18 20:00         ` Junio C Hamano
2016-07-18 21:05           ` Jonathan Tan
2016-07-18 21:36             ` Junio C Hamano
2016-07-18 22:21               ` [PATCH v2] " Jonathan Tan
2016-07-18 22:40                 ` Jonathan Nieder
2016-07-19 16:46                 ` Stefan Beller
2016-07-19 19:03                   ` Jonathan Tan
2016-07-19 19:17                     ` Stefan Beller
2016-07-19 19:23                     ` Junio C Hamano
2016-07-19 19:53                       ` Jonathan Nieder
2016-07-19 20:20                         ` Junio C Hamano
2016-07-20 13:40                         ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.