Re: [PATCH v2 3/3] grep: disable threading in all but worktree case
- From
Jeff King <peff@peff.net>
- Date
- Dec 7, 2011, 18:10 UTC
- Message-ID
- <20111207181056.GA6124@sigill.intra.peff.net>
- In-Reply-To
- <4EDF99BA.3040006@lsrfire.ath.cx>
On Wed, Dec 07, 2011 at 05:52:10PM +0100, René Scharfe wrote:
Show 10 quoted lines
> > As a user, I would do: > > > > git grep --threads=1 ... > > > > if I wanted a single-threaded process. Instead, we actually spawn a > > sub-thread and do all of the locking, which has a measurable cost: > > Yes, the difference is measurable, and that's exactly how I like it to > be. :) A user can turn off threading with --threads=0 or (more > intuitively) --no-threads. And we can quantify the overhead.
That seems acceptable to me if --threads is for speed-testing, but a horrible interface if it is meant for end users who just want git to be fast.
-Peff