Git Mailing List Archive mirror
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: Git Mailing List <git@vger.kernel.org>
Subject: Feature request: secondary index by path fragment
Date: Mon, 6 May 2024 23:11:37 +0000	[thread overview]
Message-ID: <robbat2-20240506T225759-090424131Z@orbis-terrarum.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

Maybe this already happens in the code, but if not, please consider it
as a feature request.

Gentoo has some tooling that boils down to repeated runs of 'git log -- somepath/'
via cgit as well as other shell tooling.

If the path is relatively deep for the tree (e.g. to a specific file or
sub-directory), the size of history [1] makes that a very slow operation
to go all the way back to the initial repo commit: ~12 seconds per
operation on fast hardware, ~45 seconds on slower harder - even with the
packs cached.

I was wondering if Git could gain a secondary index of commits, based on
path prefixes, that would speed up the 'git log' run.

It would need to be fast to append to the secondary index, because
Gentoo gets a steady flow of commits 24/7.

[1] 825k+ commits based on GitHub stats.

-- 
Robin Hugh Johnson
Gentoo Linux: Dev, Infra Lead, Foundation President & Treasurer
E-Mail   : robbat2@gentoo.org
GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85
GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1113 bytes --]

             reply	other threads:[~2024-05-06 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 23:11 Robin H. Johnson [this message]
2024-05-06 23:22 ` Feature request: secondary index by path fragment Junio C Hamano
2024-05-07  4:25   ` Patrick Steinhardt
2024-05-07  5:38     ` Robin H. Johnson

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=robbat2-20240506T225759-090424131Z@orbis-terrarum.net \
    --to=robbat2@gentoo.org \
    --cc=git@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).