Speed up searching for exclusions
jmarceli opened this issue · comments
Thanks for that tool, exactly something I was looking for.
One thing that may make it even better would be skipping some common folders while searching for development dependencies like:
~/Library
~/Applications
~/Music
etc.
#18 excludes ~/Library
as part of other speedup work - we can add others in the same way I suppose, but I wonder if there's a point where the exclusion checks make the overall process slower than just quickly scanning directories!
I was thinking rather about exclusion directly through find
, something like (according to https://stackoverflow.com/questions/4210042/how-to-exclude-a-directory-in-find-command):
find ~ -type d -name "${parts[0]}" -not -path "/Users/*/Library/*"
I think that this shouldn't hit overall performance (I'm not a find
expert so I may be wrong).
Also ~/.Trash
exclusion would be nice, because even if I have trash excluded in TimeMachine I still have to wait for Asimov to scan through.
Regarding the speed.
Maybe excluding nested node_modules
with find
rather than inside the dependency_file_exists()
would save some time?
What I mean is:
find ~ -type d -name "${parts[0]}" -not -path "*/node_modules/*/node_modules*"
I'm still waiting for ~/.Trash
to complete processing (about 20min) despite the fact that I've excluded trash in TM anyway...
The first run of Asimov takes about 2:30 hours, but the overall effect is great.
Thanks for this script.
Also ~/.Trash exclusion would be nice, because even if I have trash excluded in TimeMachine I still have to wait for Asimov to scan through.
Wouldn't it be better to just automatically skip all folders that are excluded from time machine then?
Yep, why not exclude everything inside the TimeMaschine ignore list from the find process? I mean the ignore list that you can manually edit in the TimeMaschin pane in settings.