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

fix: prevent "too many open files" errors from git ignored check #1127

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

cseickel
Copy link
Contributor

@cseickel cseickel commented Aug 30, 2023

fixes #1125, fixes #997

The problem was actually cuased by calling out to git too many times when checking the git ignored status of files. This only happens when there are many folders being shown at once. The solution was to limit the number of concurrent running jobs to 50.

I also snuck in a config option to completely disable checking gitignore when searching, as this has a big performance impact on the "search as you type" mode. Personally, I'd rather it be fast than be able to mark gitignored items.

require("neo-tree").setup({
  filesystem = {
    check_gitignore_in_search = false, -- Check gitignore status for files/directories when searching.
                                       -- Setting this to false will speed up searches, but gitignored
                                       -- items won't be marked if they are visible.
  }
})

The default value is true so as not to change the existing behavior.

@cseickel cseickel merged commit 71d5559 into main Aug 30, 2023
5 checks passed
@cseickel cseickel deleted the 1125-too-many-open-files branch August 30, 2023 23:49
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

Successfully merging this pull request may close these issues.

BUG: Error on filter EMFILE: too many open files
1 participant