facebook / facebook/watchman

Memory issue with large array for ignore_dirs

Open
#995 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I'd like to ignore all but one of 1200 directories in the `node_modules` for an Ember.js (node) application.

I added the 1199 directories to the `ignore_dirs` array in `.watchmanconfig`, and when I try to boot up my app, the watchman process starts eating all of my system memory, and eventually fails.

![image](https://user-images.githubusercontent.com/12248962/151796403-82be1fa1-bdd6-4b4f-8c3a-b0f079623021.png)

Everything works fine when `ignore_dirs` does not include any children of `node_modules`, but then it's watching 120 000
files unnecessarily, and I often need to have several apps running at once, and system limits become an issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.