Skip to content
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

Speed up searching for exclusions #19

Open
jmarceli opened this issue May 10, 2018 · 6 comments
Open

Speed up searching for exclusions #19

jmarceli opened this issue May 10, 2018 · 6 comments

Comments

@jmarceli
Copy link

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.
@rowanbeentje
Copy link
Contributor

#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!

@jmarceli
Copy link
Author

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*"

@rowanbeentje
Copy link
Contributor

#17 (included in #18 as well!) excludes subdeps, and yeah, that -not -path is the approach used to exclude ~/Library - I just can't help feeling that will have a cost.

(Trashes folders are a great one though)

@jmarceli
Copy link
Author

jmarceli commented May 10, 2018

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.

@FlorianWendelborn
Copy link

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?

@muuvmuuv
Copy link

muuvmuuv commented Jul 2, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants