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

5 messages from 2007-09-18 to 2007-09-18. Participants: Mike Hommey, Sam Vilain, Junio C Hamano, Johannes Schindelin.
Thread: https://gitlist.dev/t/9919

## Mike Hommey, 2007-09-18 09:09

Subject: git-fsck/lost-found's speed vs git-prune's
Message-ID: <20070918090926.GA8927@glandium.org>
URL: https://gitlist.dev/e/20070918090926.GA8927%40glandium.org

```
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, 2007-09-18 09:14

Subject: Re: git-fsck/lost-found's speed vs git-prune's
Message-ID: <46EF96FD.1050602@vilain.net>
URL: https://gitlist.dev/e/46EF96FD.1050602%40vilain.net
In-Reply-To: <20070918090926.GA8927@glandium.org>

```
Mike Hommey wrote:
> 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, 2007-09-18 09:18

Subject: Re: git-fsck/lost-found's speed vs git-prune's
Message-ID: <7v4phswcuj.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v4phswcuj.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20070918090926.GA8927@glandium.org>

```
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, 2007-09-18 09:50

Subject: Re: git-fsck/lost-found's speed vs git-prune's
Message-ID: <20070918095049.GA9388@glandium.org>
URL: https://gitlist.dev/e/20070918095049.GA9388%40glandium.org
In-Reply-To: <7v4phswcuj.fsf@gitster.siamese.dyndns.org>

```
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...

Mike

```

## Johannes Schindelin, 2007-09-18 11:13

Subject: Re: git-fsck/lost-found's speed vs git-prune's
Message-ID: <Pine.LNX.4.64.0709181211560.28586@racer.site>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0709181211560.28586%40racer.site
In-Reply-To: <20070918095049.GA9388@glandium.org>

```
Hi,

On Tue, 18 Sep 2007, Mike Hommey wrote:

> 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

```
