git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@jeffhostetler.com, git@vger.kernel.org, gitster@pobox.com,
	Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH v1] diffcore-rename: speed up register_rename_src
Date: Thu, 20 Apr 2017 11:50:03 -0400	[thread overview]
Message-ID: <20170420155003.cugkol6rbv25lpdi@sigill.intra.peff.net> (raw)
In-Reply-To: <alpine.DEB.2.20.1704201231350.3480@virtualbox>

On Thu, Apr 20, 2017 at 12:40:52PM +0200, Johannes Schindelin wrote:

> > > Teach register_rename_src() to see if new file pair can simply be
> > > appended to the rename_src[] array before performing the binary search
> > > to find the proper insertion point.
> > 
> > I guess your perf results show some minor improvement. But I suspect
> > this is because your synthetic repo does not resemble the real world
> > very much.
> 
> Please note that the synthetic test repo was added *after* coming up with
> the patch, *after* performance benchmarking on a certain really big
> repository (it is not hard to guess what use case we are optimizing,
> right?).
> 
> In that light, I would like to register the fact that Jeff's performance
> work is trying to improve a very real world, that of more than 2,000
> developers in our company [*1*].

Sure; I didn't think it came out of thin air. What are the benchmarks on
this real-world repository, then?

Specifically, it looks like this optimization isn't really about the
number of files in the repository so much as the number of
additions/deletions in a particular diff (which is what become rename
sources and destinations).

Is it common to add or delete 4 million tiny files and then run "git
status"?

Note that I think the optimization probably _is_ worth doing in the
general case. These "is it sorted" tradeoffs can backfire if we
sometimes get unsorted input, but I don't think that would ever be the
case here. My main complaint is not that it's not worth doing, but that
I'm not excited about sprinkling these checks ad-hoc throughout the code
base.

-Peff

      reply	other threads:[~2017-04-20 15:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 19:44 [PATCH v1] diffcore-rename speedup git
2017-04-18 19:44 ` [PATCH v1] diffcore-rename: speed up register_rename_src git
2017-04-19  1:32   ` Jeff King
2017-04-19  2:45     ` Junio C Hamano
2017-04-19  2:56       ` Jeff King
2017-04-19  3:18         ` Jeff King
2017-04-20 14:00           ` Jeff Hostetler
2017-04-20 16:13             ` Jeff King
2017-04-20 18:08               ` Jeff Hostetler
2017-04-20 18:34                 ` Jeff King
2017-04-21  1:19                   ` Junio C Hamano
2017-04-20 10:40     ` Johannes Schindelin
2017-04-20 15:50       ` Jeff King [this message]

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=20170420155003.cugkol6rbv25lpdi@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.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).