Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-26 Thread Duy Nguyen
On Sun, Jun 26, 2016 at 9:29 PM, David Turner wrote: > On 06/26/2016 12:27 AM, Duy Nguyen wrote: >> >> On Sat, Jun 25, 2016 at 9:21 PM, David Turner wrote: >>> >>> On 06/25/2016 10:33 AM, Duy Nguyen wrote: > > > + /* > +* Our connection to the client

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-26 Thread Eric Wong
David Turner wrote: > On 06/26/2016 04:53 AM, Eric Wong wrote: > >David Turner wrote: > >>On 06/25/2016 10:33 AM, Duy Nguyen wrote: > + /* > +* Our connection to the client is blocking since a client > +* can always be killed by SIGINT or

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-26 Thread David Turner
On 06/26/2016 12:27 AM, Duy Nguyen wrote: On Sat, Jun 25, 2016 at 9:21 PM, David Turner wrote: On 06/25/2016 10:33 AM, Duy Nguyen wrote: + /* +* Our connection to the client is blocking since a client +* can always be killed by SIGINT or similar.

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-26 Thread David Turner
On 06/26/2016 04:53 AM, Eric Wong wrote: David Turner wrote: On 06/25/2016 10:33 AM, Duy Nguyen wrote: + /* +* Our connection to the client is blocking since a client +* can always be killed by SIGINT or similar. +*/ +

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-26 Thread Eric Wong
David Turner wrote: > On 06/25/2016 10:33 AM, Duy Nguyen wrote: > >>+ /* > >>+* Our connection to the client is blocking since a client > >>+* can always be killed by SIGINT or similar. > >>+*/ > >>+ set_socket_blocking_fl

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-25 Thread Duy Nguyen
On Sat, Jun 25, 2016 at 9:21 PM, David Turner wrote: > On 06/25/2016 10:33 AM, Duy Nguyen wrote: >>> >>> + /* >>> +* Our connection to the client is blocking since a >>> client >>> +* can always be killed by SIGINT or similar. >>> +*/ >

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-25 Thread David Turner
On 06/25/2016 10:33 AM, Duy Nguyen wrote: + /* +* Our connection to the client is blocking since a client +* can always be killed by SIGINT or similar. +*/ + set_socket_blocking_flag(client_fd, 0); Out of curiosity, do

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-25 Thread Duy Nguyen
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote: > .gitignore | 1 + > Documentation/git-index-helper.txt | 50 ++ > Makefile | 5 + > cache.h| 11 ++ > contrib/completion/git-completion.b

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-25 Thread Duy Nguyen
On Fri, Jun 17, 2016 at 6:43 PM, Christian Couder wrote: > On Thu, May 19, 2016 at 11:45 PM, David Turner > wrote: >> From: Nguyễn Thái Ngọc Duy >> >> +static void loop(int fd, int idle_in_seconds) >> +{ >> + assert(idle_in_seconds < INT_MAX / 1000); > > This assert may not be very nice t

Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-06-17 Thread Christian Couder
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote: > From: Nguyễn Thái Ngọc Duy > > +static void loop(int fd, int idle_in_seconds) > +{ > + assert(idle_in_seconds < INT_MAX / 1000); This assert may not be very nice to users setting the value using --exit-after. -- To unsubscribe from th

[PATCH v12 04/20] index-helper: new daemon for caching index and related stuff

2016-05-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. Read time is reduced by 70%. The biggest gain is not having to verify the traili