-
Notifications
You must be signed in to change notification settings - Fork 319
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
jj git fetch
becomes slow over time
#293
Comments
git-branchless gets around this with its own At the very least, you could try to run a "compaction" pass over the |
The operation log means that pretty much all commits are still accessible. There's #12 about implementing GC. I imagine the user would be able to specify the oldest operation they want to keep and then everything before that operation becomes eligible for GC (whatever is only reachable before, of course).
That would help a bit, but not enough. |
Instead of keeping commits live by storing a ref to each commit directly, you could store a ref to a single commit, whose first parent is another such commit and second parent is the actual commit you want to keep live. Assuming that "haves" only look at individual refs and don't traverse them, this should speed it up. You would have to take more care about keeping commits live in an atomic manner, though. (One idea: rather than store directly in the main commit/ref, you could write loose refs and then compact any loose refs in this way when you find them.) |
Interesting idea :) I'd considered doing a similar trick with octopus merges, but your idea is simpler. Thanks! Making this part of GC (#12) makes sense. |
I'm definitely running into this too, have to go for coffee everytime I |
Two things you can try are, assuming you are not dealing with a fresh clone.
If you are dealing with a fresh clone, then it might be a different problem. |
Description
After working for a long time on a repo, I now have >23k
refs/jj/keep/*
refs (which prevent git from GC-ing commits). That makesjj git fetch
slow because all those refs are sent as "haves" for git's "negotiation" (what's called "discovery" in hg). We should figure out a way of excluding them from negotiation. I don't know if that's possible with libgit2.Specifications
The text was updated successfully, but these errors were encountered: