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

include and/or exclude glob files are re-parsed for every file added (if enabled) #146

Open
avrljk opened this issue Nov 7, 2018 · 0 comments

Comments

@avrljk
Copy link

avrljk commented Nov 7, 2018

MyData seems to open and re-parse the includesFile and/or excludesFile (if enabled) for every file it finds while walking FolderModels:

The offending open() / readlines() is in MatchesPatterns(). It's called by:

which are called in the os.walk() file loop during FolderModel initialisation.

Worst case: both glob files are re-parsed for every os.walk()-ed file if both useIncludes and useExcludes are true.

Suggestion: check and cache the {in,ex}clude glob files' modification times before the os.walk loop and re-parse them if there's a change.

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

1 participant