-
Notifications
You must be signed in to change notification settings - Fork 29
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
Re-implement getFilesIn #165
Conversation
Thanks, this sounds like an excellent speed up! I'm not sure what the actual change is though - do you have an idea as to what is actually producing the speed up? I wonder if there's a deep-listing library on Hackage we can use to solve this once and for all (maybe |
System.Directory.Extra has a |
Ah nice, well that sounds better than doing it ourselves! And I think the fix in this PR is fixing directories with cyclical symlinks - I'll double check but I don't think Edit: yea:
is on |
Hmm, interesting! I thought it was about cyclical symlinks, but maybe this library also can't deal with that as well as I thought it could |
i think so, too. or it's something else that it doesn't deal with very well? i'm playing with my implementation trying to find out where the problem is that i fixed by chance. learnings:
... i get this:
|
i see two ways to make progress here:
i have a preference for avoiding work, but you i guess it's your call? :) |
When I'm home I'll probably go with just merging your PR, I just need to test it a little bit more. Then I want to find a way to pull this code out of weeder - but no need to do them at the same time |
You might consider using the |
f5457e6 also works for me, and it's way less code in weeder (paid for with one more dependency). let me know which implementation you prefer, i'm happy with either. (slight preference for glob.) |
Awesome, thank you! |
Can you say why |
general tidyness? :) you're right, the only good reason is that the working directory might change, right? i've made another commit. |
i just removed some compiler warnings. there is a failing test on my machine, but it fails both on master and on my branch, and i don't think it's related? |
@ocharles i think this should be stable now :) could you take another look? thanks! |
Fixes #163.
I have tested this in wireapp/wire-server#4088, and it reduces run time from infinity (running out of 22G after 6-7 minutes) to 30 seconds on ~260k LOC.
If you don't like the style I'm following, just let me know and I'll try harder. :)
I would really like to write tests, but would you be ok with abstracting over IO so I can mock System.Directory? Or maybe this is overkill, not sure.