Re: [PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-26 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > To be clear the point of my mail was not to say "I can't think of a > way to support both of these things, help!", obviously we can continue > to maintain two codepaths. The point was to raise the idea that we > could simply remove the more

Re: [PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-26 Thread Ævar Arnfjörð Bjarmason
On Fri, May 26, 2017 at 2:58 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> I think it's a pointless distraction to start speculating in this >> commit message what we're going to do with --debug it if it ever >> starts emitting some

Re: [PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-25 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I think it's a pointless distraction to start speculating in this > commit message what we're going to do with --debug it if it ever > starts emitting some debugging information at pattern execution time. OK. > As an aside, I'd very much like

Re: [PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-25 Thread Ævar Arnfjörð Bjarmason
On Wed, May 24, 2017 at 6:42 AM, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason writes: > >> Rather, it's just to make the code easier to reason about. It's >> confusing to debug this under threading & non-threading when the >> threading codepaths

Re: [PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-23 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Rather, it's just to make the code easier to reason about. It's > confusing to debug this under threading & non-threading when the > threading codepaths redundantly compile a pattern which is never used. > > The reason the patterns are

[PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-23 Thread Ævar Arnfjörð Bjarmason
Change the pattern compilation logic under threading so that grep doesn't compile a pattern it never ends up using on the non-threaded code path, only to compile it again N times for N threads which will each use their own copy, ignoring the initially compiled pattern. This redundant compilation

[PATCH v2 1/7] grep: don't redundantly compile throwaway patterns under threading

2017-05-13 Thread Ævar Arnfjörð Bjarmason
Change the pattern compilation logic under threading so that grep doesn't compile a pattern it never ends up using on the non-threaded code path, only to compile it again N times for N threads which will each use their own copy, ignoring the initially compiled pattern. This redundant compilation