{"action":"reopened","issue":{"url":"https://api.github.com/repos/sindresorhus/process-exists/issues/6","repository_url":"https://api.github.com/repos/sindresorhus/process-exists","labels_url":"https://api.github.com/repos/sindresorhus/process-exists/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/process-exists/issues/6/comments","events_url":"https://api.github.com/repos/sindresorhus/process-exists/issues/6/events","html_url":"https://github.com/sindresorhus/process-exists/issues/6","id":348908467,"node_id":"MDU6SXNzdWUzNDg5MDg0Njc=","number":6,"title":"Poor performance on Windows 10","user":{"login":"mceachen","id":216377,"node_id":"MDQ6VXNlcjIxNjM3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/216377?v=4","gravatar_id":"","url":"https://api.github.com/users/mceachen","html_url":"https://github.com/mceachen","followers_url":"https://api.github.com/users/mceachen/followers","following_url":"https://api.github.com/users/mceachen/following{/other_user}","gists_url":"https://api.github.com/users/mceachen/gists{/gist_id}","starred_url":"https://api.github.com/users/mceachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mceachen/subscriptions","organizations_url":"https://api.github.com/users/mceachen/orgs","repos_url":"https://api.github.com/users/mceachen/repos","events_url":"https://api.github.com/users/mceachen/events{/privacy}","received_events_url":"https://api.github.com/users/mceachen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-08T22:03:10Z","updated_at":"2018-08-08T23:17:38Z","closed_at":null,"author_association":"NONE","body":"It seems that the current `tasklist` parsing is pretty inefficient. My windows 10 box has ~200 processes running (which seems fairly typical), and depending on the machine speed, the promise is resolved after pegging a CPU for 4 and 8 seconds.\r\n\r\nFWIW, linux and mac return within the second.\r\n\r\nDebugging information (running with git bash on the windows box):\r\n\r\n```tt\r\n$ time tasklist > /dev/null\r\n\r\nreal    0m0.249s\r\nuser    0m0.000s\r\nsys     0m0.015s\r\n\r\n$ tasklist | wc -l\r\n223\r\n\r\n$ time node -e 'require(\"process-exists\")(744).then(console.dir)'\r\ntrue\r\n\r\nreal    0m5.548s\r\nuser    0m0.000s\r\nsys     0m0.000s\r\n```"}}
{"actor":{"display_login":"mceachen"}}