threads / discuss / 9919

git-fsck/lost-found's speed vs git-prune's

Subject: git-fsck/lost-found's speed vs git-prune's

## tl;dr

5 messages between Sep 18, 2007 and Sep 18, 2007.

replies: 4people: 4as markdown or json

Mike Hommey· Sep 18, 2007, 09:09 UTC · lore
Hi,

I was wondering if that was to be expected for git-fsck to be significantly slower than git-prune (by several orders of magnitude) ?

$ time git-lost-found

real 8m22.167s user 6m44.153s sys 1m16.613s

$ time git-prune

real 0m0.376s user 0m0.304s sys 0m0.000s

Mike
Sam Vilain· Sep 18, 2007, 09:14 UTC · re: Mike Hommey · lore

Re: git-fsck/lost-found's speed vs git-prune's

Mike Hommey wrote:
Show 17 quoted lines
> Hi,
>
> I was wondering if that was to be expected for git-fsck to be
> significantly slower than git-prune (by several orders of magnitude) ?
>
> $ time git-lost-found
>
> real    8m22.167s
> user    6m44.153s
> sys     1m16.613s
>
> $ time git-prune
>
> real    0m0.376s
> user    0m0.304s
> sys     0m0.000s
>   

You're probably already packed. I'd expect a similar speed difference between git-fsck and git-fsck --full.

Sam.
Junio C Hamano· Sep 18, 2007, 09:18 UTC · re: Mike Hommey · lore

Re: git-fsck/lost-found's speed vs git-prune's

Mike Hommey <mh@glandium.org> writes:
> I was wondering if that was to be expected for git-fsck to be
> significantly slower than git-prune (by several orders of magnitude) ?

fsck validates objects are correct and sane. prune only looks at reachability.

Mike Hommey· Sep 18, 2007, 09:50 UTC · re: Junio C Hamano · lore

Re: git-fsck/lost-found's speed vs git-prune's

On Tue, Sep 18, 2007 at 02:18:44AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 7 quoted lines
> Mike Hommey <mh@glandium.org> writes:
> 
> > I was wondering if that was to be expected for git-fsck to be
> > significantly slower than git-prune (by several orders of magnitude) ?
> 
> fsck validates objects are correct and sane.  prune only looks
> at reachability.

Now, the speed difference makes sense, but I wouldn't expect lost-found to actually bother validating objects...

Mike
Johannes Schindelin· Sep 18, 2007, 11:13 UTC · re: Mike Hommey · lore

Re: git-fsck/lost-found's speed vs git-prune's

Hi,
On Tue, 18 Sep 2007, Mike Hommey wrote:
Show 11 quoted lines
> On Tue, Sep 18, 2007 at 02:18:44AM -0700, Junio C Hamano <gitster@pobox.com> wrote:
> > Mike Hommey <mh@glandium.org> writes:
> > 
> > > I was wondering if that was to be expected for git-fsck to be
> > > significantly slower than git-prune (by several orders of magnitude) ?
> > 
> > fsck validates objects are correct and sane.  prune only looks
> > at reachability.
> 
> Now, the speed difference makes sense, but I wouldn't expect lost-found
> to actually bother validating objects...

That's why we should get rid of lost-found, and only keep the --lost-found option to git-fsck, to make it clear.

And I think that it is too rare that you lost objects and want to find them, to warrant a fast version of it.

Ciao, Dscho

← back to recent threads