<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/perf, branch v2.8.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.8.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.8.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-01-25T19:42:13Z</updated>
<entry>
<title>resolve_gitlink_ref: ignore non-repository paths</title>
<updated>2016-01-25T19:42:13Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-01-22T22:29:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a2d5156c2b0e6dbffc216b4a673156487a2f8b65'/>
<id>urn:sha1:a2d5156c2b0e6dbffc216b4a673156487a2f8b65</id>
<content type='text'>
When we want to look up a submodule ref, we use
get_ref_cache(path) to find or auto-create its ref cache.
But if we feed a path that isn't actually a git repository,
we blindly create the ref cache, and then may die deeper in
the code when we try to access it. This is a problem because
many callers speculatively feed us a path that looks vaguely
like a repository, and expect us to tell them when it is
not.

This patch teaches resolve_gitlink_ref to reject
non-repository paths without creating a ref_cache. This
avoids the die(), and also performs better if you have a
large number of these faux-submodule directories (because
the ref_cache lookup is linear, under the assumption that
there won't be a large number of submodules).

To accomplish this, we also break get_ref_cache into two
pieces: the lookup and auto-creation (the latter is lumped
into create_ref_cache). This lets us first cheaply ask our
cache "is it a submodule we know about?" If so, we can avoid
repeating our filesystem lookup. So lookups of real
submodules are not penalized; they examine the submodule's
.git directory only once.

The test in t3000 demonstrates a case where this improves
correctness (we used to just die). The new perf case in
p7300 shows off the speed improvement in an admittedly
pathological repository:

Test                  HEAD^               HEAD
----------------------------------------------------------------
7300.4: ls-files -o   66.97(66.15+0.87)   0.33(0.08+0.24) -99.5%

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>filter-branch: skip index read/write when possible</title>
<updated>2015-11-06T17:35:49Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-11-06T06:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=348d4f2fc5d3c4f7ba47079b96676b4e2dd831fc'/>
<id>urn:sha1:348d4f2fc5d3c4f7ba47079b96676b4e2dd831fc</id>
<content type='text'>
If the user specifies an index filter but not a tree filter,
filter-branch cleverly avoids checking out the tree
entirely. But we don't do the next level of optimization: if
you have no index or tree filter, we do not need to read the
index at all.

This can greatly speed up cases where we are only changing
the commit objects (e.g., cementing a graft into place).
Here are numbers from the newly-added perf test:

  Test                  HEAD^              HEAD
  ---------------------------------------------------------------
  7000.2: noop filter   13.81(4.95+0.83)   5.43(0.42+0.43) -60.7%

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/perf-without-installed-git'</title>
<updated>2015-10-15T22:43:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-15T22:43:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5ef5f522a2003b1bb54936fb45ad1d544980cde'/>
<id>urn:sha1:d5ef5f522a2003b1bb54936fb45ad1d544980cde</id>
<content type='text'>
Performance-measurement tests did not work without an installed Git.

* sb/perf-without-installed-git:
  t/perf: make runner work even if Git is not installed
</content>
</entry>
<entry>
<title>t/perf: make runner work even if Git is not installed</title>
<updated>2015-09-25T17:44:59Z</updated>
<author>
<name>Stephan Beyer</name>
<email>s-beyer@gmx.net</email>
</author>
<published>2015-09-25T00:31:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=31cd12837271fbf749835672a2954dcb98b0c070'/>
<id>urn:sha1:31cd12837271fbf749835672a2954dcb98b0c070</id>
<content type='text'>
aggregate.perl did not work when Git.pm is not installed to a directory
contained in the default Perl library path list or PERLLIB.
This commit prepends the Perl library path of the current Git source
tree to enable this.

Note that this commit adds a hard-coded relative path

  use lib '../../perl/blib/lib';

instead of the flexible environment-based variant

  use lib (split(/:/, $ENV{GITPERLLIB}));

which is used in tests written in Perl.
The hard-coded variant is used because the whole performance test
framework does it that way (and GITPERLLIB is not set there).

Signed-off-by: Stephan Beyer &lt;s-beyer@gmx.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ee/clean-remove-dirs'</title>
<updated>2015-08-03T18:01:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=54d673f25d571ac2d8f50b1ccea4a7d69ca8a056'/>
<id>urn:sha1:54d673f25d571ac2d8f50b1ccea4a7d69ca8a056</id>
<content type='text'>
Replace "is this subdirectory a separate repository that should not
be touched?" check "git clean" does by checking if it has .git/HEAD
using the submodule-related code with a more optimized check.

* ee/clean-remove-dirs:
  read_gitfile_gently: fix use-after-free
  clean: improve performance when removing lots of directories
  p7300: add performance tests for clean
  t7300: add tests to document behavior of clean and nested git
  setup: sanity check file size in read_gitfile_gently
  setup: add gentle version of read_gitfile
</content>
</entry>
<entry>
<title>p5310: Fix broken &amp;&amp; chain in performance test</title>
<updated>2015-06-26T22:41:50Z</updated>
<author>
<name>Stefan Beller</name>
<email>sbeller@google.com</email>
</author>
<published>2015-06-26T21:27:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5330e6e2701185cbdab44e84dd525790eeee4492'/>
<id>urn:sha1:5330e6e2701185cbdab44e84dd525790eeee4492</id>
<content type='text'>
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>p7300: add performance tests for clean</title>
<updated>2015-06-15T20:14:18Z</updated>
<author>
<name>Erik Elfström</name>
<email>erik.elfstrom@gmail.com</email>
</author>
<published>2015-06-15T19:39:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f49a5650ab536a31a22c2b48398e0e29bb59269f'/>
<id>urn:sha1:f49a5650ab536a31a22c2b48398e0e29bb59269f</id>
<content type='text'>
The tests are run in dry-run mode to avoid having to restore the test
directories for each timed iteration. Using dry-run is an acceptable
compromise since we are mostly interested in the initial computation
of what to clean and not so much in the cleaning it self.

Signed-off-by: Erik Elfström &lt;erik.elfstrom@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>perf-lib: fix ignored exit code inside loop</title>
<updated>2015-03-25T17:21:23Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-03-25T05:25:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ecb590a9de231a3312527da023cd5b60328ae22e'/>
<id>urn:sha1:ecb590a9de231a3312527da023cd5b60328ae22e</id>
<content type='text'>
When copying the test repository, we try to detect whether
the copy succeeded. However, most of the heavy lifting is
done inside a for loop, where our "break" will lose the exit
code of the failing "cp". We can take advantage of the fact
that we are in a subshell, and just "exit 1" to break out
with a code.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/repack-pack-writebitmaps-config'</title>
<updated>2014-06-25T19:23:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-25T19:23:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=25f3119000ab8b98cb54e9925f4e307a5dab2f87'/>
<id>urn:sha1:25f3119000ab8b98cb54e9925f4e307a5dab2f87</id>
<content type='text'>
* jk/repack-pack-writebitmaps-config:
  t7700: drop explicit --no-pack-kept-objects from .keep test
  repack: introduce repack.writeBitmaps config option
  repack: simplify handling of --write-bitmap-index
  pack-objects: stop respecting pack.writebitmaps
</content>
</entry>
<entry>
<title>repack: introduce repack.writeBitmaps config option</title>
<updated>2014-06-10T21:05:19Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-06-10T20:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=71d76cb48029c94af022ea9dc9c74b4ba8bcc3a3'/>
<id>urn:sha1:71d76cb48029c94af022ea9dc9c74b4ba8bcc3a3</id>
<content type='text'>
We currently have pack.writeBitmaps, which originally
operated at the pack-objects level. This should really have
been a repack.* option from day one. Let's give it the more
sensible name, but keep the old version as a deprecated
synonym.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
