[PATCH 0/3] avoid quadratic behavior in fetch-pack
- From
Jeff King <peff@peff.net>
- Date
- Jul 2, 2013, 06:11 UTC
- Message-ID
- <20130702061149.GB1206@sigill.intra.peff.net>
- In-Reply-To
- <20130702052827.GA10626@sigill.intra.peff.net>
Here are my patches to deal with Martin's pathological case, split out for easy reading. I took a few timings to show that the results of the 3rd patch are noticeable even with 50,000 unique refs (which is still a lot, but something that I could conceive of a busy repo accumulating over time).
[1/3]: fetch-pack: avoid quadratic list insertion in mark_complete [2/3]: commit.c: make compare_commits_by_commit_date global [3/3]: fetch-pack: avoid quadratic behavior in rev_list_push
And here's the diffstat to prove it is really not scary. :)
commit.c | 2 +- commit.h | 2 ++ fetch-pack.c | 16 ++++++++-------- 3 files changed, 11 insertions(+), 9 deletions(-)
-Peff