Re: [PATCH/RFC] grep: turn off threading when recursing submodules

2017-10-19 Thread Martin Ågren
On 19 October 2017 at 21:34, Jeff King wrote: > On Thu, Oct 19, 2017 at 12:26:18PM -0700, Brandon Williams wrote: > >> One alternative to turning off threading would be to employ proper >> locking (like I failed to do) by wrapping the call the >> 'add_to_alternates_memory()' in calls to grep_read_

Re: [PATCH/RFC] grep: turn off threading when recursing submodules

2017-10-19 Thread Jeff King
On Thu, Oct 19, 2017 at 12:26:18PM -0700, Brandon Williams wrote: > One alternative to turning off threading would be to employ proper > locking (like I failed to do) by wrapping the call the > 'add_to_alternates_memory()' in calls to grep_read_lock/unlock: > > + grep_read_lock(); >

Re: [PATCH/RFC] grep: turn off threading when recursing submodules

2017-10-19 Thread Brandon Williams
On 10/19, Martin Ågren wrote: > With --recurse-submodules, we use the machinery for alternate object > databases and pretend that the repository is an alternate ODB. This has > some drawbacks since the list of alternates is global and will grow as > we proceed. Still, that's a problem with performa

[PATCH/RFC] grep: turn off threading when recursing submodules

2017-10-19 Thread Martin Ågren
With --recurse-submodules, we use the machinery for alternate object databases and pretend that the repository is an alternate ODB. This has some drawbacks since the list of alternates is global and will grow as we proceed. Still, that's a problem with performance, not correctness. The other immedi