Skip to contentSkip to conversation

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

DISCUSSION Mike Hommey 4 participants 5 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 11 lines · Mike Hommey

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
Quoted 6 lines
$ 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.

#2 lore raw
In reply to Mike Hommey
Quoted 2 lines · Mike Hommey

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.

#3 lore raw
Quoted 7 lines · Junio C Hamano
Quoted 2 lines · Mike Hommey

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

#4 lore raw

Hi,

Quoted 11 lines · Mike Hommey
Quoted 7 lines · Junio C Hamano
Quoted 2 lines · Mike Hommey

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