sync() slowdown
- From
- Sebastien Gross <seb-git@chezwam.org>
- Date
- May 26, 2008, 14:26 UTC
- Message-ID
- <20080526142607.GA3082@kali.thurne.chezwam.org>
Hi git users,
I use git (a very basic usage) every day and I noticed a big slowdown when I do a "git repack -a -d".
I noticed that it only happens when I do backup to an usb stick.
After a few investigation, I noticed that sync() is call when repacking objects (from both builtin-prune.c and builtin-prune-packed.c).
I do understand that syncing filesystem is usefull and needed.
But is there a good idea to add a --no-sync option to prevent that behaviour ?
I think this might be useful if you repack many repositories. If you call the sync command before looping the repacks I guess this could be equivalent (modulo changes done in repositories during that time).
Any idea suggestions ?
Thanks lot
Cheers.
-- Sébastien Gross