git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Daniel Koverman <dkoverman@predictiveTechnologies.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Why does send-pack call pack-objects for all remote refs?
Date: Mon, 7 Dec 2015 21:02:22 +0000	[thread overview]
Message-ID: <4766c8518c2a46afb88fc0a2dd9a1688@EXCHANGE1U.uunet.arlington.PredictiveTechnologies.com> (raw)

I have a repository which has ~2000 branches on the remote, and it takes ~8 seconds to push a change to one ref. The majority of this time is spent in pack-object. I wrote a hack so that only the ref being updated would be packed (the normal behavior is to pack for every ref on the remote).  The push time dropped to <1 second with (seemingly) no consequences. This raised a couple of questions:

1) Are there consequences for not packing refs that are not being updated? Can all operations in send-pack which operate on other refs be skipped?
2) Why isn't git more selective about what it packs? Is it simply a performance optimization not worth the implementation complexity?
3) Is something about my repository strange? ex: 2000 is too many branches, packing for each ref takes me an unusually long time, etc.

Thanks in advance to anyone who takes the time to clarify this for me.

Daniel

             reply	other threads:[~2015-12-07 21:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 21:02 Daniel Koverman [this message]
2015-12-07 22:41 ` Why does send-pack call pack-objects for all remote refs? Junio C Hamano
2015-12-07 22:57   ` Jeff King
2015-12-08 17:34     ` Daniel Koverman
2015-12-10  4:19       ` Jeff King
2015-12-12  4:15         ` Nasser Grainawi
2015-12-14 13:47         ` Daniel Koverman
2015-12-14 21:04           ` Jeff King
2015-12-14 22:31             ` Jonathan Nieder
2015-12-14 22:37               ` Jeff King

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=4766c8518c2a46afb88fc0a2dd9a1688@EXCHANGE1U.uunet.arlington.PredictiveTechnologies.com \
    --to=dkoverman@predictivetechnologies.com \
    --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.
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).