-
Notifications
You must be signed in to change notification settings - Fork 739
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
Slow on macOS tiny file removal ( Sequoia 15.3 | git 2.48 | Python 3.12 ) #642
Comments
You're saying that What's the output of Your repository isn't that large from the stats you provided; I'd expect it to run much faster. Could you run git-sizer on it to see if you have a very unusual data shape of some form, and provide that output here as well? |
@newren I added a log here before
|
The line you highlighted should be run exactly once per program invocation, so if you see it hitting that line 1000 times in ~4 minutes, then something is horribly broken with the setup. Where did you get git-filter-repo from? What version? What other modifications did you (or others) make to it?
Your output looks reasonable. The repo is getting close to needing a repack (
Sorry, can you re-run with the --verbose option? |
Hey @newren I'm using a copy pasted version of the Click to expand
Here is the log on a git clone with depth of 3k (the counting section makes up 99% of the time to run): Click to expand
Click to expand
|
Well, I feel a bit dumb. What if you make this change:
Does that speed it up considerably? |
Even if it doesn't fix your case that's an important fix, so I committed and pushed it as ccc1885 (filter-repo: avoid parsing the repository refs repeatedly, 2025-02-18). So, you can also try out the fix by just grabbing the latest version. Let me know if it fixes it for you. |
@newren YUP 7s now. Nice one!
|
What is happening
Running this on a 9 byte file takes over 1 hour:
Environment Specs
du -sh .git
is 104mbWhat I tried
I added logs everywhere to track down what is taking long and narrowed it down here to
GitUtils.get_refs(target_working_dir)
which callsgit show-ref
.I tried several versions of python starting from 3.10 to 3.12.9. I updated git from 2.39 to 2.48.
Workarounds?
@newren Are there any workarounds that you are aware of on mac like bumping up resources somehow or commenting out unnecessary parts?
The text was updated successfully, but these errors were encountered: