Files
git/builtin
Rasmus Villemoes e2e05d619a grep: move grep_source_init outside critical section
grep_source_init typically does three strdup()s, and in the threaded
case, the call from add_work() happens while holding grep_mutex.

We can thus reduce the time we hold grep_mutex by moving the
grep_source_init() call out of add_work(), and simply have add_work()
copy the initialized structure to the available slot in the todo
array.

This also simplifies the prototype of add_work(), since it no longer
needs to duplicate all the parameters of grep_source_init(). In the
callers of add_work(), we get to reduce the amount of code duplicated in
the threaded and non-threaded cases slightly (avoiding repeating the
long "GREP_SOURCE_OID, pathbuf.buf, path, oid" argument list); a
subsequent cleanup patch will make that even more so.

Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-23 12:23:26 -08:00
..
2017-11-27 11:06:37 +09:00
2017-10-06 10:07:18 +09:00
2017-12-27 11:16:25 -08:00
2017-11-18 12:31:29 +09:00
2017-10-07 16:27:55 +09:00
2017-09-25 15:24:07 +09:00
2017-11-21 14:07:50 +09:00
2017-12-27 11:16:29 -08:00
2017-08-26 22:55:09 -07:00
2017-12-06 09:23:39 -08:00
2017-12-13 13:28:54 -08:00
2017-12-06 09:23:44 -08:00
2017-11-18 12:31:29 +09:00
2017-12-27 11:16:29 -08:00
2017-12-27 11:16:21 -08:00
2017-08-22 10:29:03 -07:00
2017-12-27 11:16:29 -08:00
2017-11-06 14:24:27 +09:00
2017-11-21 14:07:50 +09:00