Re: [PATCH v2 0/7] thread lazy_init_name_hash
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Apr 6, 2017, 02:22 UTC
- Message-ID
- <CACsJy8CCb+i3xjtEY=6_dWCGw8VJHT1Mo5973YmQ-6xpTd=z=g@mail.gmail.com>
- In-Reply-To
- <1490276825-41544-1-git-send-email-git@jeffhostetler.com>
On Thu, Mar 23, 2017 at 8:46 PM, <git@jeffhostetler.com> wrote:
Show 9 quoted lines
> This patch series is a performance optimization for > lazy_init_name_hash() in name-hash.c on very large > repositories. > > This change allows lazy_init_name_hash() to optionally > use multiple threads when building the the_index.dir_hash > and the_index.name_hash hashmaps. The original code path > has been preserved and is used when the repo is small or > the system does not have sufficient CPUs.
If sha1 verification in the index file can now be optionally skipped, I wonder if you would have faster startup time by storing hashes in the index as an extension. I have never tried it (though I planned to have some sort of caching for this) but I would guess loading hashes would cost less than 0.27 seconds, hopefully closer to 0.05 seconds.
-- Duy