Re: sync() slowdown
- From
Matthieu Moy <matthieu.moy@imag.fr>
- Date
- May 26, 2008, 16:09 UTC
- Message-ID
- <vpq1w3p59ns.fsf@bauges.imag.fr>
- In-Reply-To
- <20080526142607.GA3082@kali.thurne.chezwam.org>
Sebastien Gross <seb-git@chezwam.org> writes:
> 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).
I suppose git-repack does something like
write_new_data(); sync(); delete_old_data();
And if you remove the "sync" and your system crashes (or you eject your USB key, or ...) while "delete_old_data" is done, but "write_new_data" hasn't been sync-ed to the hard disk, you're in trouble.
If you repack many repositories, I guess the first time is expansive, but the next ones pay only for what they just did.
My 2 cents,
-- Matthieu