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

2016-03-15 Thread Junio C Hamano
Duy Nguyen writes: > Another aspect that's not mentioned is, we keep this daemon's logic as > thin as possible. The "brain" stays in git. So the daemon can read and > validate stuff, but that's about all it's allowed to do. It's not > supposed to add/create new contents. It's

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

2016-03-15 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:09 AM, Junio C Hamano wrote: > David Turner writes: > >> 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

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

2016-03-15 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 1:36 AM, David Turner wrote: > Git can poke the daemon to tell it to refresh the index cache, or to > keep it alive some more minutes via UNIX signals. The reason I went with UNIX signals was because it made it possible to make a simple

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

2016-03-10 Thread Duy Nguyen
On Fri, Mar 11, 2016 at 3:22 AM, David Turner wrote: > Reads (ignoring SHA verification) will be slightly slower (due to the > btree overhead). If, in general, we only had to read part of the > index, that would be faster. But a fair amount of git code is written > to

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

2016-03-10 Thread David Turner
On Thu, 2016-03-10 at 18:17 +0700, Duy Nguyen wrote: > On Thu, Mar 10, 2016 at 6:21 AM, Junio C Hamano > wrote: > > Junio C Hamano writes: > > > > > David Turner writes: > > > > > > > From: Nguyễn Thái Ngọc Duy

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

2016-03-10 Thread Duy Nguyen
On Thu, Mar 10, 2016 at 6:21 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> David Turner writes: >> >>> From: Nguyễn Thái Ngọc Duy >>> >>> Instead of reading the index from disk and worrying about disk

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

2016-03-09 Thread David Turner
On Wed, 2016-03-09 at 15:09 -0800, Junio C Hamano wrote: > David Turner writes: > > > 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

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

2016-03-09 Thread David Turner
On Wed, 2016-03-09 at 15:21 -0800, Junio C Hamano wrote: > Junio C Hamano writes: > > > David Turner writes: > > > > > From: Nguyễn Thái Ngọc Duy > > > > > > Instead of reading the index from disk and worrying about disk > > >

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

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > David Turner writes: > >> 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

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

2016-03-09 Thread Junio C Hamano
David Turner writes: > 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.

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

2016-03-09 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