* [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time
@ 2014-07-12 19:25 Pranith Kumar
2014-07-16 2:23 ` Pranith Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2014-07-12 19:25 UTC (permalink / raw)
To: Joe Perches, open list
get_maintainer tries to follow files with a matching threshold of default 50%.
This is not really necessary as we do not change a file and move it in the same
commit usually. Increasing the threshold to 90% should be sufficient.
I encountered this on a recent commit where I was touching 12 files. Time take
dropped from 24 sec to 12 sec after this change. It can be reduced further by
increasing the threshold, but I think 90% is sufficient.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
scripts/get_maintainer.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index d701627..bc4a69e 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -98,7 +98,7 @@ my %VCS_cmds_git = (
"execute_cmd" => \&git_execute_cmd,
"available" => '(which("git") ne "") && (-e ".git")',
"find_signers_cmd" =>
- "git log --no-color --follow --since=\$email_git_since " .
+ "git log --no-color --follow -M90 --since=\$email_git_since " .
'--numstat --no-merges ' .
'--format="GitCommit: %H%n' .
'GitAuthor: %an <%ae>%n' .
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time
2014-07-12 19:25 [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time Pranith Kumar
@ 2014-07-16 2:23 ` Pranith Kumar
2014-07-16 4:08 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2014-07-16 2:23 UTC (permalink / raw)
To: Joe Perches, open list
ping?
On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> get_maintainer tries to follow files with a matching threshold of default 50%.
> This is not really necessary as we do not change a file and move it in the same
> commit usually. Increasing the threshold to 90% should be sufficient.
>
> I encountered this on a recent commit where I was touching 12 files. Time take
> dropped from 24 sec to 12 sec after this change. It can be reduced further by
> increasing the threshold, but I think 90% is sufficient.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
> scripts/get_maintainer.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index d701627..bc4a69e 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -98,7 +98,7 @@ my %VCS_cmds_git = (
> "execute_cmd" => \&git_execute_cmd,
> "available" => '(which("git") ne "") && (-e ".git")',
> "find_signers_cmd" =>
> - "git log --no-color --follow --since=\$email_git_since " .
> + "git log --no-color --follow -M90 --since=\$email_git_since " .
> '--numstat --no-merges ' .
> '--format="GitCommit: %H%n' .
> 'GitAuthor: %an <%ae>%n' .
> --
> 1.9.1
>
--
Pranith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time
2014-07-16 2:23 ` Pranith Kumar
@ 2014-07-16 4:08 ` Joe Perches
2014-07-16 4:35 ` Pranith Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2014-07-16 4:08 UTC (permalink / raw)
To: Pranith Kumar; +Cc: open list
On Tue, 2014-07-15 at 22:23 -0400, Pranith Kumar wrote:
> ping?
>
> On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> > get_maintainer tries to follow files with a matching threshold of default 50%.
> > This is not really necessary as we do not change a file and move it in the same
> > commit usually. Increasing the threshold to 90% should be sufficient.
[]
> > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> > index d701627..bc4a69e 100755
> > --- a/scripts/get_maintainer.pl
> > +++ b/scripts/get_maintainer.pl
> > @@ -98,7 +98,7 @@ my %VCS_cmds_git = (
> > "execute_cmd" => \&git_execute_cmd,
> > "available" => '(which("git") ne "") && (-e ".git")',
> > "find_signers_cmd" =>
> > - "git log --no-color --follow --since=\$email_git_since " .
> > + "git log --no-color --follow -M90 --since=\$email_git_since " .
> > '--numstat --no-merges ' .
> > '--format="GitCommit: %H%n' .
> > 'GitAuthor: %an <%ae>%n' .
While I understand the goal, I wonder if this should
be in a .gitconfig, not in get_maintainers at all.
(git doesn't seem to have a config entry for score though)
If not, the % should probably be cmd-line configurable.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time
2014-07-16 4:08 ` Joe Perches
@ 2014-07-16 4:35 ` Pranith Kumar
2014-07-16 4:50 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2014-07-16 4:35 UTC (permalink / raw)
To: Joe Perches; +Cc: open list
On Wed, Jul 16, 2014 at 12:08 AM, Joe Perches <joe@perches.com> wrote:
> On Tue, 2014-07-15 at 22:23 -0400, Pranith Kumar wrote:
>> ping?
>>
>> On Sat, Jul 12, 2014 at 3:25 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
>> > get_maintainer tries to follow files with a matching threshold of default 50%.
>> > This is not really necessary as we do not change a file and move it in the same
>> > commit usually. Increasing the threshold to 90% should be sufficient.
<snip>
> While I understand the goal, I wonder if this should
> be in a .gitconfig, not in get_maintainers at all.
>
> (git doesn't seem to have a config entry for score though)
>
> If not, the % should probably be cmd-line configurable.
>
>
The problem is with the default which is at 50% now. That means that a
commit needs to have changed a file by more than 50% -and- moved it in
the same commit. This is highly discouraged and unlikely to happen in
our case.
Even if we have this a cmd-line configuration, setting the default to
90% really makes sense, no?
--
Pranith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time
2014-07-16 4:35 ` Pranith Kumar
@ 2014-07-16 4:50 ` Joe Perches
0 siblings, 0 replies; 5+ messages in thread
From: Joe Perches @ 2014-07-16 4:50 UTC (permalink / raw)
To: Pranith Kumar; +Cc: open list
On Wed, 2014-07-16 at 00:35 -0400, Pranith Kumar wrote:
> The problem is with the default which is at 50% now. That means that a
> commit needs to have changed a file by more than 50% -and- moved it in
> the same commit. This is highly discouraged and unlikely to happen in
> our case.
>
> Even if we have this a cmd-line configuration, setting the default to
> 90% really makes sense, no?
Dunno. If it makes sense, maybe it makes global sense
and should be the git default. If not, maybe other users
have different needs and need some other cmdline option.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-16 4:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-12 19:25 [PATCH 1/1] scripts/get_maintainer: increase threshold for --follow to reduce time Pranith Kumar
2014-07-16 2:23 ` Pranith Kumar
2014-07-16 4:08 ` Joe Perches
2014-07-16 4:35 ` Pranith Kumar
2014-07-16 4:50 ` Joe Perches
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 NNTP newsgroup(s).