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

[PATCH v5 0/4] read-cache: speed up add_index_entry

From
Ggit@jeffhostetler.com <git@jeffhostetler.com>
Date
Apr 5, 2017, 17:38 UTC
Message-ID
<20170405173809.3098-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>

[This is labeled as version 5 because of a cut-n-paste accident where my first version of this patch was labeled version 4.]

This version adds more perf tests to p0004-read-tree.sh

================ Teach add_index_entry_with_check() and has_dir_name() to avoid index lookups if the given path sorts after the last entry in the index.

This saves at least 2 binary searches per entry.

This improves performance during checkout and read-tree because merge_working_tree() and unpack_trees() processes a list of already sorted entries.

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

Jeff Hostetler (4):
  p0004-read-tree: perf test to time read-tree
  read-cache: add strcmp_offset function
  test-strcmp-offset: created test for strcmp_offset
  read-cache: speed up add_index_entry during checkout
 Makefile                      |   1 +
 cache.h                       |   1 +
 read-cache.c                  |  73 +++++++++++++++++++++++++-
 t/helper/.gitignore           |   1 +
 t/helper/test-strcmp-offset.c |  64 +++++++++++++++++++++++
 t/perf/p0004-read-tree.sh     | 116 ++++++++++++++++++++++++++++++++++++++++++
 t/t0065-strcmp-offset.sh      |  11 ++++
 7 files changed, 266 insertions(+), 1 deletion(-)
 create mode 100644 t/helper/test-strcmp-offset.c
 create mode 100755 t/perf/p0004-read-tree.sh
 create mode 100755 t/t0065-strcmp-offset.sh
-- 
2.9.3
Next: git@jeffhostetler.com
Message 1 of 16 in “read-cache: speed up add_index_entry”
  1. 0/4 read-cache: speed up add_index_entrygit@jeffhostetler.com, Apr 5, 2017
  2. 4/4 read-cache: speed up add_index_entry during checkoutgit@jeffhostetler.com, Apr 5, 2017
  3. SZEDER GáborApr 5, 2017
  4. Jeff HostetlerApr 6, 2017
  5. 3/4 test-strcmp-offset: created test for strcmp_offsetgit@jeffhostetler.com, Apr 5, 2017
  6. SZEDER GáborApr 5, 2017
  7. Johannes SchindelinApr 6, 2017
  8. Jeff HostetlerApr 6, 2017
  9. René ScharfeApr 6, 2017
  10. Jeff HostetlerApr 6, 2017
  11. 1/4 p0004-read-tree: perf test to time read-treegit@jeffhostetler.com, Apr 5, 2017
  12. René ScharfeApr 6, 2017
  13. Jeff HostetlerApr 6, 2017
  14. 2/4 read-cache: add strcmp_offset functiongit@jeffhostetler.com, Apr 5, 2017
  15. SZEDER GáborApr 6, 2017
  16. Jeff HostetlerApr 6, 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.