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

Re: [RFC HACK] refresh_index: lstat() in inode order

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 6, 2012, 18:37 UTC
Message-ID
<7vipihtw2d.fsf@alter.siamese.dyndns.org>
In-Reply-To
<871up6cewp.fsf@thomas.inf.ethz.ch>
Thomas Rast <trast@inf.ethz.ch> writes:
> The dirty hack below uses the inode field in the index to sort the index
> entries prior to the real work of refresh_index.

I think we do something similar in fsck to touch loose object files in clusters, and would not be surprised if you see performance boost by running lstat(2) in clusters for the purpose of refresh_index().

Right now, preload_index() partitions the index entries by offset and hands them out to worker threads, but it _might_ make sense to use fewer number of threads and give them entries sorted by the inum.

Previous: Thomas Rast
Message 2 of 2 in “[RFC HACK] refresh_index: lstat() in inode order”
  1. Thomas RastMar 6, 2012
  2. Junio C HamanoMar 6, 2012

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.