From: Matheus Tavares <matheus.bernardino@usp.br>
To: git@vger.kernel.org
Cc: "Christian Couder" <christian.couder@gmail.com>,
"Olga Telezhnaya" <olyatelezhnaya@gmail.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
kernel-usp@googlegroups.com, "Jeff King" <peff@peff.net>,
"Junio C Hamano" <gitster@pobox.com>,
"Brandon Williams" <bwilliams.eng@gmail.com>
Subject: [GSoC][RFC WIP PATCH 3/3] grep: re-enable threads in non-worktree case
Date: Fri, 19 Jul 2019 20:08:54 -0300 [thread overview]
Message-ID: <e72330c6747218545cce1b6b1edfd1e448141a8f.1563570204.git.matheus.bernardino@usp.br> (raw)
In-Reply-To: <cover.1563570204.git.matheus.bernardino@usp.br>
They were disabled at 53b8d93 ("grep: disable threading in non-worktree
case", 12-12-2011), due to observable perfomance drops. But now that
zlib inflation can be performed in parallel, we can regain the speedup.
Grep'ing 'abcd[02]' ("Regex 1") and '(static|extern) (int|double) \*'
("Regex 2") at chromium's repository[1] I got:
Threads | Regex 1 | Regex 2
---------|------------|-----------
1 | 17.5815s | 21.7217s
2 | 9.7983s | 11.3965s
8 | 6.3097s | 6.9667s
These are all means of 30 executions after 2 warmup runs. All tests were
executed on a i7-7700HQ with 16GB of RAM and SSD.
[1]: chromium’s repo at commit 03ae96f (“Add filters testing at DSF=2”,
04-06-2019), after a 'git gc' execution.
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
---
builtin/grep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/grep.c b/builtin/grep.c
index 682e2461d0..9309dea833 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -1046,7 +1046,7 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
pathspec.recursive = 1;
pathspec.recurse_submodules = !!recurse_submodules;
- if (list.nr || cached || show_in_pager) {
+ if (show_in_pager) {
if (num_threads > 1)
warning(_("invalid option combination, ignoring --threads"));
num_threads = 1;
--
2.22.0
prev parent reply other threads:[~2019-07-19 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-19 23:08 [GSoC][RFC WIP PATCH 0/3] grep: allow parallelism in zlib inflation Matheus Tavares
2019-07-19 23:08 ` [GSoC][RFC WIP PATCH 1/3] object-store: make read_object_file_extended() thread-safe Matheus Tavares
2019-07-19 23:08 ` [GSoC][RFC WIP PATCH 2/3] grep: remove locks on object reading operations Matheus Tavares
2019-07-19 23:08 ` Matheus Tavares [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e72330c6747218545cce1b6b1edfd1e448141a8f.1563570204.git.matheus.bernardino@usp.br \
--to=matheus.bernardino@usp.br \
--cc=bwilliams.eng@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kernel-usp@googlegroups.com \
--cc=olyatelezhnaya@gmail.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).