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

[PATCH v10 0/5] git checkout: optimise away lots of lstat() calls

From
KBKjetil Barvik <barvik@broadpark.no>
Date
Jan 18, 2009, 15:14 UTC
Message-ID
<1232291694-18083-1-git-send-email-barvik@broadpark.no>
Changes since version 9

--- patch 1/5 --- bug fix (missed optimisation): If we have track_flags = FL_SYMLINK|FL_DIR, and:

     cache  =>   A/B/C/D/S   (a symlink)
     name   =>   A/B/C       (a directory)

The cache would return with a (cached) FL_DIR result as expected, _but_ it would set the cache to "A/B/C", so we lose some information.

--- patch 4/5 --- bug fix: if we get a match from the cache for the name to invalidate, we reset the cache if we are not allowed to track directories (inside the invalidate_lstat_cache() function).

Kjetil Barvik (5):
  lstat_cache(): more cache effective symlink/directory detection
  lstat_cache(): introduce has_symlink_or_noent_leading_path() function
  lstat_cache(): introduce has_dirs_only_path() function
  lstat_cache(): introduce invalidate_lstat_cache() function
  lstat_cache(): introduce clear_lstat_cache() function
 cache.h        |    4 +
 entry.c        |   34 +++-----
 symlinks.c     |  263 ++++++++++++++++++++++++++++++++++++++++++++++---------
 unpack-trees.c |    4 +-
 4 files changed, 238 insertions(+), 67 deletions(-)
Next: Kjetil Barvik
Message 1 of 6 in “git checkout: optimise away lots of lstat() calls”
  1. 0/5 git checkout: optimise away lots of lstat() callsKjetil Barvik, Jan 18, 2009
  2. 1/5 lstat_cache(): more cache effective symlink/directory detectionKjetil Barvik, Jan 18, 2009
  3. 2/5 lstat_cache(): introduce has_symlink_or_noent_leading_path() functionKjetil Barvik, Jan 18, 2009
  4. 3/5 lstat_cache(): introduce has_dirs_only_path() functionKjetil Barvik, Jan 18, 2009
  5. 4/5 lstat_cache(): introduce invalidate_lstat_cache() functionKjetil Barvik, Jan 18, 2009
  6. 5/5 lstat_cache(): introduce clear_lstat_cache() functionKjetil Barvik, Jan 18, 2009

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.