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

Try to avoid readDir where pathExists may suffice #32

Open
roberth opened this issue Nov 18, 2019 · 2 comments
Open

Try to avoid readDir where pathExists may suffice #32

roberth opened this issue Nov 18, 2019 · 2 comments

Comments

@roberth
Copy link
Member

roberth commented Nov 18, 2019

@grahamc

it looks like if the gitignore lib used builtins.pathExists instead of readDir to find .gitignore and .git dir entries, it would be much more optimally performant with lorri
since it uses readDir we effectively have to trigger new evaluations any time the list of files in a directory changes
whereas a pathExists call we can be much more precise about the watch behavior

Most of the IO there is written with memoization in mind
I don't see a reason right now why we can't do a pathExists before some readDirs so that seems worthwhile to investigate

@roberth
Copy link
Member Author

roberth commented Nov 22, 2019

@Profpatsch @grahamc I was able to eliminate some readDirs, see #33

Could you check whether this solves the problem?

@Profpatsch
Copy link

Profpatsch commented Nov 28, 2019

@curiousleo says he can’t reproduce: target/lorri#245 (comment)

update: he can’t reproduce even before this change. I’ll take a look.

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

2 participants