-
Notifications
You must be signed in to change notification settings - Fork 9
Run git gc
occasionally
#10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think this would be the first suggestion from docs.rs I feel I should turn down. Even though If the gc is blocking, it would slow down the caller from time to time, and if it is asynchronous, it would have to fork off a thread to run the gc operation there. It could probably be implemented so that it won't launch multiple gc's concurrently, yet I am not sure I trust a git writer (gc) to not interfere in various ways with the reader. However, I could imagine to have it implemented as a separate 'maintenance' function that can be handled by the caller themselves. Something like This makes me think it's safer for docs.rs to implement it themselves, and run it on their own account while possibly blocking other readers while the gc is in progress. This could be as easy as spawning a What do you think? |
That's about what we thought too, yeah.
Presumably this would be a function that's optional to call? In that case I think we'd be better off implementing it ourselves, it would be less complicated on both ends.
That sounds reasonable. I do think you should document that |
This is intended as: this crate determines if cleanup should be performed, and if not, return |
I think we wouldn't use that on our end, but I appreciate the offer! I also very much appreciate the documentation change :) |
In docs.rs, we just found we had very high CPU and IO usage because we had never run
git gc
. It would be great ifcrates-index-diff
ran this automatically, the same way thatgit
runsgit gc
automatically once in a while.See also rust-lang/docs.rs#778.
The text was updated successfully, but these errors were encountered: