Re: [PATCH v4 03/16] index-helper: new daemon for caching index and related stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 14, 2016 at 1:47 AM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote:
>> > +       fd = unix_stream_connect(socket_path);
>> > +       if (refresh_cache) {
>> > +               ret = write_in_full(fd, "refresh", 8) != 8;
>>
>> Since we've moved to unix socket and had bidirectional communication,
>> it's probably a good idea to read an "ok" back, giving index-helper
>> time to prepare the cache. As I recall the last discussion with
>> Johannes, missing a cache here when the index is around 300MB could
>> hurt more than wait patiently once and have it ready next time.
>
> It is somewhat slower to wait for the daemon (which requires a disk
> load + a memcpy) than it is to just load it ourselves (which is just a
> disk load).

You forgot the most costly part, SHA-1 verification. For very large
index, I assume the index-helper is already in the middle of hashing
the index content. If you ignore index-helper, you need to go hash the
whole thing again. The index-helper can hand it to you if you wait
just a bit more. This wait time should be shorter because index-helper
is already in the middle of hashing (and in optimistic case, very
close to finishing it).
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]