git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v7 3/3] read-cache: speed up add_index_entry during checkout

From
Jeff King <peff@peff.net>
Date
Apr 8, 2017, 09:40 UTC
Message-ID
<20170408094021.jdpx5l7kfv423zgj@sigill.intra.peff.net>
In-Reply-To
<20170407212047.64950-4-git@jeffhostetler.com>
On Fri, Apr 07, 2017 at 09:20:47PM +0000, git@jeffhostetler.com wrote:
Show 16 quoted lines
> This helps performance on very large repositories.
> 
> ================
> Before and after numbers on index with 1M files
> ./p0004-read-tree.sh
> 0004.2: read-tree work1 (1003037)          3.21(2.54+0.62)
> 0004.3: switch base work1 (3038 1003037)   7.49(5.39+1.84)
> 0004.5: switch work1 work2 (1003037)       11.91(8.38+3.00)
> 0004.6: switch commit aliases (1003037)    12.22(8.30+3.06)
> 
> ./p0004-read-tree.sh
> 0004.2: read-tree work1 (1003040)          2.40(1.65+0.73)
> 0004.3: switch base work1 (3041 1003040)   6.07(4.12+1.66)
> 0004.5: switch work1 work2 (1003040)       10.23(6.76+2.92)
> 0004.6: switch commit aliases (1003040)    10.53(6.97+2.83)
> ================
By the way, you may want to try:
  $ cd t/perf
  $ ./run HEAD^ HEAD p0004-read-tree.sh

which gives you the before/after in a nice table, with percentage changes:

  Test                                       HEAD^             HEAD                  
  -----------------------------------------------------------------------------------
  0004.2: read-tree work1 (1003065)          2.34(1.90+0.42)   1.91(1.51+0.38) -18.4%
  0004.3: switch base work1 (3066 1003065)   5.12(4.14+0.96)   4.45(3.55+0.88) -13.1%
  0004.5: switch work1 work2 (1003065)       8.55(6.63+1.87)   7.78(5.76+2.00) -9.0% 
  0004.6: switch commit aliases (1003065)    8.59(6.75+1.80)   7.64(5.92+1.70) -11.1%

The results are stored for each tested version, so you can re-run just a single test and then re-output the results with "./aggregate.perl HEAD^ HEAD p0004-read-tree.sh".

The "run" script obviously builds each version behind the scenes, so you probably also want to set GIT_PERF_MAKE_OPTS as appropriate (at the very least "-j16" makes it more pleasant).

-Peff
Previous: git@jeffhostetler.comNext: git@jeffhostetler.com
Message 3 of 8 in “read-cache: speed up add_index_entry”
  1. 0/3 read-cache: speed up add_index_entrygit@jeffhostetler.com, Apr 7, 2017
  2. 3/3 read-cache: speed up add_index_entry during checkoutgit@jeffhostetler.com, Apr 7, 2017
  3. Jeff KingApr 8, 2017
  4. 2/3 p0004-read-tree: perf test to time read-treegit@jeffhostetler.com, Apr 7, 2017
  5. Jeff KingApr 8, 2017
  6. Jeff HostetlerApr 10, 2017
  7. 1/3 read-cache: add strcmp_offset functiongit@jeffhostetler.com, Apr 7, 2017
  8. Jeff KingApr 8, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.