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

[PATCH v10 0/3] read-cache: speed up add_index_entry

From
Ggit@jeffhostetler.com <git@jeffhostetler.com>
Date
Apr 14, 2017, 19:12 UTC
Message-ID
<20170414191230.52825-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>

Version 10 addresses mailing list comments on coding style in read-cache.c and in p0006. I've also adjusted the speed-up algorithm and more thoroughly documented the cases in the code.

We skip the binary searches whenever we can prove that the new entry (and every sub-directory prefix of the entry) clearly FOLLOWS the last entry in the index. Otherwise, we fall through to the existing search algorithm -- which handles stages and CE_REMOVE entries.

Jeff Hostetler (3):
  read-cache: add strcmp_offset function
  p0006-read-tree-checkout: perf test to time read-tree
  read-cache: speed up add_index_entry during checkout
 Makefile                           |   1 +
 cache.h                            |   1 +
 read-cache.c                       | 138 ++++++++++++++++++++++++++++++++++++-
 t/helper/.gitignore                |   1 +
 t/helper/test-strcmp-offset.c      |  22 ++++++
 t/perf/p0006-read-tree-checkout.sh |  67 ++++++++++++++++++
 t/perf/repos/.gitignore            |   1 +
 t/perf/repos/many-files.sh         | 110 +++++++++++++++++++++++++++++
 t/t0065-strcmp-offset.sh           |  21 ++++++
 9 files changed, 360 insertions(+), 2 deletions(-)
 create mode 100644 t/helper/test-strcmp-offset.c
 create mode 100755 t/perf/p0006-read-tree-checkout.sh
 create mode 100644 t/perf/repos/.gitignore
 create mode 100755 t/perf/repos/many-files.sh
 create mode 100755 t/t0065-strcmp-offset.sh
-- 
2.9.3
Next: git@jeffhostetler.com
Message 1 of 7 in “read-cache: speed up add_index_entry”
  1. 0/3 read-cache: speed up add_index_entrygit@jeffhostetler.com, Apr 14, 2017
  2. 2/3 p0006-read-tree-checkout: perf test to time read-treegit@jeffhostetler.com, Apr 14, 2017
  3. 1/3 read-cache: add strcmp_offset functiongit@jeffhostetler.com, Apr 14, 2017
  4. 3/3 read-cache: speed up add_index_entry during checkoutgit@jeffhostetler.com, Apr 14, 2017
  5. René ScharfeApr 15, 2017
  6. Jeff HostetlerApr 17, 2017
  7. Jeff HostetlerApr 18, 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.