{"action":"created","issue":{"url":"https://api.github.com/repos/remy/nodemon/issues/620","labels_url":"https://api.github.com/repos/remy/nodemon/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/remy/nodemon/issues/620/comments","events_url":"https://api.github.com/repos/remy/nodemon/issues/620/events","html_url":"https://github.com/remy/nodemon/issues/620","id":103729457,"number":620,"title":"find getting executed on showWatchCount even if useFind == false","user":{"login":"santiagoaguiar","id":963231,"avatar_url":"https://avatars.githubusercontent.com/u/963231?v=3","gravatar_id":"","url":"https://api.github.com/users/santiagoaguiar","html_url":"https://github.com/santiagoaguiar","followers_url":"https://api.github.com/users/santiagoaguiar/followers","following_url":"https://api.github.com/users/santiagoaguiar/following{/other_user}","gists_url":"https://api.github.com/users/santiagoaguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/santiagoaguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiagoaguiar/subscriptions","organizations_url":"https://api.github.com/users/santiagoaguiar/orgs","repos_url":"https://api.github.com/users/santiagoaguiar/repos","events_url":"https://api.github.com/users/santiagoaguiar/events{/privacy}","received_events_url":"https://api.github.com/users/santiagoaguiar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/remy/nodemon/labels/help%20wanted","name":"help wanted","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-28T14:34:38Z","updated_at":"2015-08-30T13:39:25Z","closed_at":null,"body":"Using latest while running on windows on git bash, `showWatchCount` is getting executed and uses `find` even if `useFind` is `false`, which causes a:\r\n\r\n    watching <a lot of> files - this might cause high cpu usage. To reduce use \"--watch\".\r\n\r\nbecause the argument to find mixes windows/linux path seps and just doesn't work OK.\r\n\r\nI think the offending line is here: https://github.com/remy/nodemon/blob/master/lib/monitor/watch.js#L168, which end ups calling `showWatchCount` event when `useFind` is false."},"comment":{"url":"https://api.github.com/repos/remy/nodemon/issues/comments/136138803","html_url":"https://github.com/remy/nodemon/issues/620#issuecomment-136138803","issue_url":"https://api.github.com/repos/remy/nodemon/issues/620","id":136138803,"user":{"login":"santiagoaguiar","id":963231,"avatar_url":"https://avatars.githubusercontent.com/u/963231?v=3","gravatar_id":"","url":"https://api.github.com/users/santiagoaguiar","html_url":"https://github.com/santiagoaguiar","followers_url":"https://api.github.com/users/santiagoaguiar/followers","following_url":"https://api.github.com/users/santiagoaguiar/following{/other_user}","gists_url":"https://api.github.com/users/santiagoaguiar/gists{/gist_id}","starred_url":"https://api.github.com/users/santiagoaguiar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santiagoaguiar/subscriptions","organizations_url":"https://api.github.com/users/santiagoaguiar/orgs","repos_url":"https://api.github.com/users/santiagoaguiar/repos","events_url":"https://api.github.com/users/santiagoaguiar/events{/privacy}","received_events_url":"https://api.github.com/users/santiagoaguiar/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T13:39:25Z","updated_at":"2015-08-30T13:39:25Z","body":"`useFind` does resolve to false, even if `find` is present on git bash. And currently is a good thing, since because of how the paths are passed, using `find` wouldn't work under git bash as it is.\r\n\r\nBut in any case, `showWatchCount` now only works if `find` exists, though on the code it's called after  checking that `useFind` is false. Since as far as I can see, `showWatchCount` is purely informative, wouldn't it be possible to call it only if `useFind` is true until there's an implementation that does not uses `find`?"}}