git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Caleb Gray <hey@calebgray.com>
Cc: git@vger.kernel.org
Subject: Re: Add a "Flattened Cache" to `git --clone`?
Date: Thu, 14 May 2020 15:30:39 -0700	[thread overview]
Message-ID: <xmqqeermp2sw.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAGjfG9akT+KG-tttRWEX_ZqxrqPoY_4Ed7Pymt4DkV5Rgc1CEA@mail.gmail.com> (Caleb Gray's message of "Thu, 14 May 2020 15:04:46 -0700")

Caleb Gray <hey@calebgray.com> writes:

> Actually those are the steps that I'm explicitly hoping can be
> skipped, both on server and client, after the first successful clone
> request transaction. The cache itself would be of the end resulting
> `.git` directory (client side)... unless I have misconceptions about

If you look at .git/objects/pack/ directory in your repository that
is a clone of somebody else, most likely you'd find even number of
files in there, those whose filename ends with .pack and their
counterparts whose filename ends with .idx extension.  Both files
must exist to perform any local operation, but during the initial
cloning, only the bits in the former are transferred, and the
contents of the latter must be constructed from the bits in the
former.

You can introduce a new protocol that copies the contents of the
.idx, but the contents of that file MUST be validated on the
receiving end, which entails the same amount of computation as our
clients currently spend to construct it out of .pack, so in the end,
you'd be wasting more bandwidth to transfer .idx which is redundant
information without saving processing cycles.

  reply	other threads:[~2020-05-14 22:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 14:34 Add a "Flattened Cache" to `git --clone`? Caleb Gray
2020-05-14 20:33 ` Konstantin Ryabitsev
2020-05-14 20:54   ` Bryan Turner
2020-05-14 21:05   ` Theodore Y. Ts'o
2020-05-14 21:09     ` Eric Sunshine
2020-05-14 21:10     ` Konstantin Ryabitsev
2020-05-14 21:23       ` Junio C Hamano
2020-05-14 21:44         ` Konstantin Ryabitsev
2020-05-15 21:42           ` Eric Wong
2020-05-17 22:12             ` Konstantin Ryabitsev
     [not found]               ` <1061511589863147@mail.yandex.ru>
2020-05-25 14:02                 ` Caleb Gray
2020-05-14 21:33     ` Caleb Gray
2020-05-14 21:56       ` Junio C Hamano
2020-05-14 22:04         ` Caleb Gray
2020-05-14 22:30           ` Junio C Hamano [this message]
2020-05-14 22:44           ` Bryan Turner
2020-05-14 21:19   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqeermp2sw.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=hey@calebgray.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).