{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3784","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3784/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3784/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3784/events","html_url":"https://github.com/eslint/eslint/issues/3784","id":106234152,"number":3784,"title":"CLI performance","user":{"login":"mantoni","id":332271,"avatar_url":"https://avatars.githubusercontent.com/u/332271?v=3","gravatar_id":"","url":"https://api.github.com/users/mantoni","html_url":"https://github.com/mantoni","followers_url":"https://api.github.com/users/mantoni/followers","following_url":"https://api.github.com/users/mantoni/following{/other_user}","gists_url":"https://api.github.com/users/mantoni/gists{/gist_id}","starred_url":"https://api.github.com/users/mantoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mantoni/subscriptions","organizations_url":"https://api.github.com/users/mantoni/orgs","repos_url":"https://api.github.com/users/mantoni/repos","events_url":"https://api.github.com/users/mantoni/events{/privacy}","received_events_url":"https://api.github.com/users/mantoni/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/triage","name":"triage","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-13T19:05:21Z","updated_at":"2015-09-13T20:50:17Z","closed_at":null,"body":"I just started using ESLint in Vim (through Syntactic, as suggested in the Readme). It works great, but it's a little slow, blocking the UI when opening or saving files, because Vim can't run tasks in the background. So I made a few quick checks (on a new MacBook, 1.1 GHz Intel Core M w/ flash drive):\r\n\r\nOverall execution time on a very simple file with an empty ES 6 class definition:\r\n\r\n```\r\n$ time node_modules/.bin/eslint test.js\r\n\r\nreal    0m0.787s\r\nuser    0m0.700s\r\nsys     0m0.082s\r\n```\r\n\r\nNode v4.0.0 launch time:\r\n\r\n```\r\n$ time node -p 'console.log(\"\");'\r\n\r\nreal    0m0.134s\r\nuser    0m0.110s\r\nsys     0m0.021s\r\n```\r\n\r\nAdding `console.time()` and `console.timeEnd()` around [bin/eslint.js require statements](https://github.com/eslint/eslint/blob/master/bin/eslint.js#L2-L4), produced timings between `362ms` and `425ms`.\r\n\r\nThis means that the actual execution time of ESLint isn't bad at all, but especially loading all the modules cause it to feel slow in my use case.\r\n\r\nAnother Vim plugin I use is [ternjs](http://ternjs.net) and it uses a very nice trick: They launch a server process in the background and a light weight client sends commands to the server. I was thinking that this approach could work for ESLint as well, causing all the heavy modules to be loaded only once. This could be realized as a separate project, or might be built into ESLint itself.\r\n\r\nWhat do you think?"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/139917198","html_url":"https://github.com/eslint/eslint/issues/3784#issuecomment-139917198","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3784","id":139917198,"user":{"login":"ilyavolodin","id":1380062,"avatar_url":"https://avatars.githubusercontent.com/u/1380062?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyavolodin","html_url":"https://github.com/ilyavolodin","followers_url":"https://api.github.com/users/ilyavolodin/followers","following_url":"https://api.github.com/users/ilyavolodin/following{/other_user}","gists_url":"https://api.github.com/users/ilyavolodin/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyavolodin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyavolodin/subscriptions","organizations_url":"https://api.github.com/users/ilyavolodin/orgs","repos_url":"https://api.github.com/users/ilyavolodin/repos","events_url":"https://api.github.com/users/ilyavolodin/events{/privacy}","received_events_url":"https://api.github.com/users/ilyavolodin/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T20:50:17Z","updated_at":"2015-09-13T20:50:17Z","body":"@mantoni I mean that's it's related due to the use of background processes."}}