{"action":"created","issue":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/228","labels_url":"https://api.github.com/repos/paulmillr/chokidar/issues/228/labels{/name}","comments_url":"https://api.github.com/repos/paulmillr/chokidar/issues/228/comments","events_url":"https://api.github.com/repos/paulmillr/chokidar/issues/228/events","html_url":"https://github.com/paulmillr/chokidar/issues/228","id":57298686,"number":228,"title":"Performance on Windows is unacceptable for large folders","user":{"login":"bpasero","id":900690,"avatar_url":"https://avatars.githubusercontent.com/u/900690?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasero","html_url":"https://github.com/bpasero","followers_url":"https://api.github.com/users/bpasero/followers","following_url":"https://api.github.com/users/bpasero/following{/other_user}","gists_url":"https://api.github.com/users/bpasero/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasero/subscriptions","organizations_url":"https://api.github.com/users/bpasero/orgs","repos_url":"https://api.github.com/users/bpasero/repos","events_url":"https://api.github.com/users/bpasero/events{/privacy}","received_events_url":"https://api.github.com/users/bpasero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-11T10:29:05Z","updated_at":"2015-02-11T11:38:40Z","closed_at":null,"body":"I am using chokidar 1.0.0-rc3 watching my Desktop that has 40.000 files, 5765 folders and about 2.6 GB in total. The code is as follows:\r\n\r\n```\r\nvar chokidar = require(\"chokidar\");\r\n\r\nconsole.log(\"before watch\");\r\n\r\nvar watcher = chokidar.watch(\"C:\\\\Users\\\\benjpas\\\\Desktop\", { \r\n\tignoreInitial: true,\r\n\tpersistent: true \r\n});\r\n\r\nconsole.log(\"after watch\");\r\n\r\nwatcher.on(\"all\", function(type, path) {\r\n\tconsole.log(type, path);\r\n});\r\n\r\nwatcher.on(\"error\", function(error) {\r\n\tconsole.log(\"error handler \", error);\r\n});\r\n\r\nprocess.on('uncaughtException', function(error) {\r\n\tconsole.log(\"uncaughtException: \", error);\r\n});\r\n```\r\n\r\nWatching my process explorer after starting, I see the node.exe process quickly consuming > 400 MB of memory while keeping a steady high CPU load for a long time. I also notice that while chokidar is busy, file events get lost (that is, after startup I was quickly doing a change in some deep nested folder and this event was not showing up in the handlers).\r\n\r\nVideo of the process going crazy below:\r\n\r\n![chokidar-watch](https://cloud.githubusercontent.com/assets/900690/6145334/fec0f2f2-b1e0-11e4-82de-df6e37b549b6.gif)\r\n\r\nHow can we nail this down further? Are you guys using some tools for profiling? Is there something I can try different to see if it has any impact?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/paulmillr/chokidar/issues/comments/73868274","html_url":"https://github.com/paulmillr/chokidar/issues/228#issuecomment-73868274","issue_url":"https://api.github.com/repos/paulmillr/chokidar/issues/228","id":73868274,"user":{"login":"es128","id":1740641,"avatar_url":"https://avatars.githubusercontent.com/u/1740641?v=3","gravatar_id":"","url":"https://api.github.com/users/es128","html_url":"https://github.com/es128","followers_url":"https://api.github.com/users/es128/followers","following_url":"https://api.github.com/users/es128/following{/other_user}","gists_url":"https://api.github.com/users/es128/gists{/gist_id}","starred_url":"https://api.github.com/users/es128/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/es128/subscriptions","organizations_url":"https://api.github.com/users/es128/orgs","repos_url":"https://api.github.com/users/es128/repos","events_url":"https://api.github.com/users/es128/events{/privacy}","received_events_url":"https://api.github.com/users/es128/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T11:38:40Z","updated_at":"2015-02-11T11:38:40Z","body":"This is most likely all from the `readdirp` initial scan, not the watching itself. You should be waiting for the `ready` event before you expect change events to be detected properly. \r\n\r\n`ignoreInitial` does not prevent the need to walk the file tree ahead of time in order to get accurate events. "}}