From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Brandon Casey <casey@nrlssc.navy.mil>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: "git reflog expire --all" very slow
Date: Mon, 30 Mar 2009 22:50:20 -0700 [thread overview]
Message-ID: <7vr60e6y1v.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <7vy6um6z9m.fsf@gitster.siamese.dyndns.org> (Junio C. Hamano's message of "Mon, 30 Mar 2009 22:24:05 -0700")
Junio C Hamano <gitster@pobox.com> writes:
> Linus Torvalds <torvalds@linux-foundation.org> writes:
>> ...
>> This if anything makes things just go slower.
>>
>> Not much, but some. It went from 36.566s to 38.070s. That may be in the
>> noise, I've not done any sensitivity analysis.
>
> I actually think that the cutoff for history traversal is bogus. You may
> have a 30-day old reflog entry that pulled in a 45-day old commit, and
> giving up the smudging at the expiry cutoff timestamp does not make much
> sense.
>
> I do have a lot of reflog entries kept around, as my main repository has
> these:
>
> [gc]
> reflogexpire = '2005-01-01 00:00:00 +0000'
> reflogexpireunreachable = '2005-01-01 00:00:00 +0000'
>
> so let me experiment a bit more.
To initially prune a copy of my git repository that was never pruned
before, it takes a lot of time with or without the patch to prune from the
original 73476 reflog entries.
(without patch)
23.46user 0.23system 0:23.70elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+5464outputs (0major+6045minor)pagefaults 0swaps
(with patch, but with a bit of fprintf's for counting)
21.99user 0.40system 0:22.56elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+5472outputs (0major+6040minor)pagefaults 0swaps
After the initial pruning, with 13780 reflog entries still left (and no
further pruning expected), I am seeing these:
(without patch)
2.09user 0.22system 0:02.32elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+5464outputs (0major+4956minor)pagefaults 0swaps
(with patch, but again with a bit of fprintf's for counting)
0.76user 0.25system 0:01.05elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+5464outputs (0major+4918minor)pagefaults 0swaps
I might be better off traversing down all the way and do away with
in_merge_bases(), but that might hold true only for something small like
git.git and the kernel.
next prev parent reply other threads:[~2009-03-31 5:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-31 1:43 "git reflog expire --all" very slow Linus Torvalds
2009-03-31 4:34 ` Junio C Hamano
2009-03-31 5:09 ` Linus Torvalds
2009-03-31 5:24 ` Junio C Hamano
2009-03-31 5:42 ` Linus Torvalds
2009-03-31 5:57 ` Junio C Hamano
2009-03-31 5:50 ` Junio C Hamano [this message]
2009-03-31 5:38 ` Linus Torvalds
2009-03-31 5:50 ` Linus Torvalds
2009-03-31 5:51 ` Linus Torvalds
2009-04-02 6:46 ` Junio C Hamano
2009-04-02 15:30 ` Linus Torvalds
2009-03-31 6:08 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr60e6y1v.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=casey@nrlssc.navy.mil \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=torvalds@linux-foundation.org \
/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.
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).