From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Taylor Blau <me@ttaylorr.com>, Derrick Stolee <stolee@gmail.com>
Subject: [PATCH v2 0/2] fetch: speed up mirror-fetches with many refs
Date: Wed, 2 Feb 2022 13:51:43 +0100 [thread overview]
Message-ID: <cover.1643806143.git.ps@pks.im> (raw)
In-Reply-To: <cover.1643364888.git.ps@pks.im>
[-- Attachment #1: Type: text/plain, Size: 2458 bytes --]
Hi,
this is the second version of my patch series which aims to speed up
mirror-fetches in repos with huge amounts of refs. The only change
compared to v1 is a fixed up commit message: Taylor has pointed out to
me that commit dates retrieved from the commit-graph are not in fact the
corrected commit dates, which are stored separately.
Patrick
Patrick Steinhardt (2):
fetch-pack: use commit-graph when computing cutoff
fetch: skip computing output width when not printing anything
builtin/fetch.c | 8 ++++++--
fetch-pack.c | 28 ++++++++++++++++------------
2 files changed, 22 insertions(+), 14 deletions(-)
Range-diff against v1:
1: 31cf8f87a1 ! 1: 6fac914f0f fetch-pack: use commit-graph when computing cutoff
@@ Commit message
the cutoff date. This can be sped up by trying to look up commits via
the commit-graph first, which is a lot more efficient.
- One thing to keep in mind though is that the commit-graph corrects
- committer dates:
-
- * A commit with at least one parent has corrected committer date
- equal to the maximum of its commiter date and one more than the
- largest corrected committer date among its parents.
-
- As a result, it may be that the commit date we load via the commit graph
- is more recent than it would have been when loaded via the ODB, and as a
- result we may also choose a more recent cutoff point. But as the code
- documents, this is only a heuristic and it is okay if we determine a
- wrong cutoff date. The worst that can happen is that we report more
- commits as HAVEs to the server when using corrected dates.
-
- Loading commits via the commit-graph is typically much faster than
- loading commits via the object database. Benchmarks in a repository with
- about 2,1 million refs and an up-to-date commit-graph show a 20% speedup
- when mirror-fetching:
+ Benchmarks in a repository with about 2,1 million refs and an up-to-date
+ commit-graph show a 20% speedup when mirror-fetching:
Benchmark 1: git fetch --atomic +refs/*:refs/* (v2.35.0)
Time (mean ± σ): 75.264 s ± 1.115 s [User: 68.199 s, System: 10.094 s]
2: 5a3fd3232f = 2: 4b9bbcf795 fetch: skip computing output width when not printing anything
--
2.35.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2022-02-02 12:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 10:15 [PATCH 0/2] fetch: speed up mirror-fetches with many refs Patrick Steinhardt
2022-01-28 10:17 ` [PATCH 1/2] fetch-pack: use commit-graph when computing cutoff Patrick Steinhardt
2022-01-31 22:53 ` Taylor Blau
2022-02-02 12:46 ` Patrick Steinhardt
2022-01-28 10:19 ` [PATCH 2/2] fetch: skip computing output width when not printing anything Patrick Steinhardt
2022-02-02 12:51 ` Patrick Steinhardt [this message]
2022-02-02 12:51 ` [PATCH v2 1/2] fetch-pack: use commit-graph when computing cutoff Patrick Steinhardt
2022-02-09 18:01 ` Christian Couder
2022-02-10 11:43 ` Patrick Steinhardt
2022-02-02 12:51 ` [PATCH v2 2/2] fetch: skip computing output width when not printing anything Patrick Steinhardt
2022-02-09 18:10 ` Christian Couder
2022-02-10 12:23 ` Patrick Steinhardt
2022-02-10 12:28 ` [PATCH v3 0/2] fetch: speed up mirror-fetches with many refs Patrick Steinhardt
2022-02-10 12:28 ` [PATCH v3 1/2] fetch-pack: use commit-graph when computing cutoff Patrick Steinhardt
2022-02-10 12:28 ` [PATCH v3 2/2] fetch: skip computing output width when not printing anything Patrick Steinhardt
2022-02-10 18:04 ` [PATCH v3 0/2] fetch: speed up mirror-fetches with many refs Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1643806143.git.ps@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.