-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
listing local repositories is very slow since recent changes #74
Comments
I'm runnig these tests on a normal speed SSD disk. Heres an additional timed iteration using find:
|
I find that this also extends to the Edit: Oh, this is because this command kicks off a new shell, loading my lengthy |
I guess that the PR #66 could make
|
The extra directories in the newer version is because some repositories has other repositories in them which were skipped before #66 and I don't care for them since those are "owned" by their parent repository anyway. |
New numbers, recompiled binaries with go162 and now running latest ubuntu 16.04 kernel. All the files: $ time find . | wc -l
971769
real 0m1.787s
user 0m0.640s
sys 0m1.212s
recompiled 53c4cae $ time ghq list | wc -l
DEPRECATED Action signature. Must be `cli.ActionFunc`. This is an error in the application. Please contact the distributor of this application if this is not you. See https://github.com/urfave/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature
490
real 0m0.205s
user 0m0.084s
sys 0m0.104s
compiled from master $ time ghq list | wc -l
496
real 0m11.759s
user 0m4.488s
sys 0m5.896s Compiled from 3464624 (the 0.7.4 tag) which also works great $ time ghq list | wc -l
DEPRECATED Action signature. Must be `cli.ActionFunc`. This is an error in the application. Please contact the distributor of this application if this is not you. See https://github.com/urfave/cli/blob/master/CHANGELOG.md#deprecated-cli-app-action-signature
490
real 0m0.219s
user 0m0.084s
sys 0m0.112s
|
Thank you for the detailed information. Now I'm wondering if I should add an option to use the old behavior reverted by #66. Let me make things clearer, as for "some repositories has other repositories in them which were skipped", you mean the layout look like below, where you don't need the "bar" directory? I don't think this could happen since if the parent directory was found to be a repository, then its children won't be visited (https://github.com/motemen/ghq/blob/c087d82/local_repository.go#L169). Are there anything I am missing?
|
I use ghq with peco and in it's current state it is unusable. I have 84 repositories and it takes ~10 seconds to list them. What's the last version that I should install which doesn't include the new behavior? Edit: downgrading to 0.7.0 and now it takes 0.10 seconds. yay! |
I guess that this might have been fixed now? Unless I'm unaware that I use my own patched version of ghq it probably is fixed or just much better now. |
It take about 5 seconds now:
I quickly tried using https://github.com/MichaelTJones/walk which helps a bit:
Reverting back to 53c4cae (bump version to 0.7.3) the speed is up again:
For most situations I rather go back to the old behaviour in most situations if it isn't possible to solve this somewhere else.. Maybe adding an option to stop traversal is a good idea?
I also tried using MichaelTJones/walk on 53c4cae but that only listed one repository so it's not working well there.. I havent had time to really read through the changes now so I'll be using 53c4cae as a temporary workaround.
The text was updated successfully, but these errors were encountered: