pack-objects: don't use too many threads with few objects
commitbf874896240cb00b22cd4f6cbcc143b17cc7fe0e
authorNicolas Pitre <nico@cam.org>
Sat, 13 Dec 2008 20:06:40 +0000 (13 15:06 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 14 Dec 2008 02:55:55 +0000 (13 18:55 -0800)
tree9709b69f299ab2b9b207591402d49b0bfde82905
parent43cc2b4266cc75f1a5a10e1a805d05e419000573
pack-objects: don't use too many threads with few objects

If there are few objects to deltify, they might be split amongst threads
so that there is simply no other objects left to delta against within
the same thread.  Let's use the same 2*window treshold as used for the
final load balancing to allow extra threads to be created.

This fixes the benign t5300 test failure.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Tested-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c