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.