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(+)
Show changes to fetch-pack.c +2 −0
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