{"action":"created","comment":{"url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments/81448046","pull_request_review_id":2429948,"id":81448046,"diff_hunk":"@@ -122,17 +122,22 @@ function init () {\n }\n \n function delayedInit () {\n+  if (app.isQuitting) return\n+\n   const announcement = require('./announcement')\n   const dock = require('./dock')\n-  const tray = require('./tray')\n   const updater = require('./updater')\n   const userTasks = require('./user-tasks')\n \n   announcement.init()\n   dock.init()\n-  tray.init()\n   updater.init()\n   userTasks.init()\n+\n+  if (process.platform !== 'darwin') {\n+    const tray = require('./tray')","path":"src/main/index.js","position":19,"original_position":19,"commit_id":"0d175a7b260098209327616ae70bad451aa3e9bf","original_commit_id":"7ecf7103ae92a218ff56067af1e52d999d7e80f9","user":{"login":"demoneaux","id":813865,"avatar_url":"https://avatars.githubusercontent.com/u/813865?v=3","gravatar_id":"","url":"https://api.github.com/users/demoneaux","html_url":"https://github.com/demoneaux","followers_url":"https://api.github.com/users/demoneaux/followers","following_url":"https://api.github.com/users/demoneaux/following{/other_user}","gists_url":"https://api.github.com/users/demoneaux/gists{/gist_id}","starred_url":"https://api.github.com/users/demoneaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demoneaux/subscriptions","organizations_url":"https://api.github.com/users/demoneaux/orgs","repos_url":"https://api.github.com/users/demoneaux/repos","events_url":"https://api.github.com/users/demoneaux/events{/privacy}","received_events_url":"https://api.github.com/users/demoneaux/received_events","type":"User","site_admin":false},"body":"If you’re doing that, maybe you might want to only load `./user-tasks.js` on Windows only?","created_at":"2016-10-01T10:39:24Z","updated_at":"2016-10-01T10:48:36Z","html_url":"https://github.com/feross/webtorrent-desktop/pull/995#discussion_r81448046","pull_request_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995","_links":{"self":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments/81448046"},"html":{"href":"https://github.com/feross/webtorrent-desktop/pull/995#discussion_r81448046"},"pull_request":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995"}}},"pull_request":{"url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995","id":87595809,"html_url":"https://github.com/feross/webtorrent-desktop/pull/995","diff_url":"https://github.com/feross/webtorrent-desktop/pull/995.diff","patch_url":"https://github.com/feross/webtorrent-desktop/pull/995.patch","issue_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/995","number":995,"state":"open","locked":false,"title":"Make app startup in less than 1 second (~400ms improvement)","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"body":"## Holy require!\r\n\r\nLet's look at the number of times that `require()` is called before UI is shown. Ignore duplicate calls to require the same module, since those are instant.\r\n\r\n### Before this PR\r\n\r\nMain process: 36 calls\r\nRenderer process: 557 calls (~1340ms) \r\n\r\n### After this PR\r\n\r\nMain process: 31 calls\r\nRenderer process: 282 calls (~960ms)\r\n\r\nAfter this, time to init is basically around 940 - 1070ms on various runs, on my 12\" Macbook, with the default torrents, all disabled at startup time.\r\n","created_at":"2016-10-01T08:22:41Z","updated_at":"2016-10-01T10:48:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58260b201dcf2461f8a12ad53c926f0294674f08","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995/commits","review_comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995/comments","review_comment_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/995/comments","statuses_url":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/0d175a7b260098209327616ae70bad451aa3e9bf","head":{"label":"feross:feross/perf","ref":"feross/perf","sha":"0d175a7b260098209327616ae70bad451aa3e9bf","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"repo":{"id":35015575,"name":"webtorrent-desktop","full_name":"feross/webtorrent-desktop","owner":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/feross/webtorrent-desktop","description":":heart: Streaming torrent app for Mac, Windows, and Linux (BitTorrent & WebTorrent)","fork":false,"url":"https://api.github.com/repos/feross/webtorrent-desktop","forks_url":"https://api.github.com/repos/feross/webtorrent-desktop/forks","keys_url":"https://api.github.com/repos/feross/webtorrent-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feross/webtorrent-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feross/webtorrent-desktop/teams","hooks_url":"https://api.github.com/repos/feross/webtorrent-desktop/hooks","issue_events_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/feross/webtorrent-desktop/events","assignees_url":"https://api.github.com/repos/feross/webtorrent-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/feross/webtorrent-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/tags","blobs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/feross/webtorrent-desktop/languages","stargazers_url":"https://api.github.com/repos/feross/webtorrent-desktop/stargazers","contributors_url":"https://api.github.com/repos/feross/webtorrent-desktop/contributors","subscribers_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscribers","subscription_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscription","commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/feross/webtorrent-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/feross/webtorrent-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feross/webtorrent-desktop/merges","archive_url":"https://api.github.com/repos/feross/webtorrent-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feross/webtorrent-desktop/downloads","issues_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/feross/webtorrent-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/feross/webtorrent-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feross/webtorrent-desktop/labels{/name}","releases_url":"https://api.github.com/repos/feross/webtorrent-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/feross/webtorrent-desktop/deployments","created_at":"2015-05-04T05:21:35Z","updated_at":"2016-10-01T10:35:21Z","pushed_at":"2016-10-01T08:44:11Z","git_url":"git://github.com/feross/webtorrent-desktop.git","ssh_url":"git@github.com:feross/webtorrent-desktop.git","clone_url":"https://github.com/feross/webtorrent-desktop.git","svn_url":"https://github.com/feross/webtorrent-desktop","homepage":"https://webtorrent.io/desktop","size":92906,"stargazers_count":2382,"watchers_count":2382,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":223,"mirror_url":null,"open_issues_count":74,"forks":223,"open_issues":74,"watchers":2382,"default_branch":"master"}},"base":{"label":"feross:master","ref":"master","sha":"76e071e9658107f3734993b0c647cfd16738b703","user":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"repo":{"id":35015575,"name":"webtorrent-desktop","full_name":"feross/webtorrent-desktop","owner":{"login":"feross","id":121766,"avatar_url":"https://avatars.githubusercontent.com/u/121766?v=3","gravatar_id":"","url":"https://api.github.com/users/feross","html_url":"https://github.com/feross","followers_url":"https://api.github.com/users/feross/followers","following_url":"https://api.github.com/users/feross/following{/other_user}","gists_url":"https://api.github.com/users/feross/gists{/gist_id}","starred_url":"https://api.github.com/users/feross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feross/subscriptions","organizations_url":"https://api.github.com/users/feross/orgs","repos_url":"https://api.github.com/users/feross/repos","events_url":"https://api.github.com/users/feross/events{/privacy}","received_events_url":"https://api.github.com/users/feross/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/feross/webtorrent-desktop","description":":heart: Streaming torrent app for Mac, Windows, and Linux (BitTorrent & WebTorrent)","fork":false,"url":"https://api.github.com/repos/feross/webtorrent-desktop","forks_url":"https://api.github.com/repos/feross/webtorrent-desktop/forks","keys_url":"https://api.github.com/repos/feross/webtorrent-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/feross/webtorrent-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/feross/webtorrent-desktop/teams","hooks_url":"https://api.github.com/repos/feross/webtorrent-desktop/hooks","issue_events_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/feross/webtorrent-desktop/events","assignees_url":"https://api.github.com/repos/feross/webtorrent-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/feross/webtorrent-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/tags","blobs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/feross/webtorrent-desktop/languages","stargazers_url":"https://api.github.com/repos/feross/webtorrent-desktop/stargazers","contributors_url":"https://api.github.com/repos/feross/webtorrent-desktop/contributors","subscribers_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscribers","subscription_url":"https://api.github.com/repos/feross/webtorrent-desktop/subscription","commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/feross/webtorrent-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/feross/webtorrent-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/feross/webtorrent-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/feross/webtorrent-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/feross/webtorrent-desktop/merges","archive_url":"https://api.github.com/repos/feross/webtorrent-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/feross/webtorrent-desktop/downloads","issues_url":"https://api.github.com/repos/feross/webtorrent-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/feross/webtorrent-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/feross/webtorrent-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/feross/webtorrent-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/feross/webtorrent-desktop/labels{/name}","releases_url":"https://api.github.com/repos/feross/webtorrent-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/feross/webtorrent-desktop/deployments","created_at":"2015-05-04T05:21:35Z","updated_at":"2016-10-01T10:35:21Z","pushed_at":"2016-10-01T08:44:11Z","git_url":"git://github.com/feross/webtorrent-desktop.git","ssh_url":"git@github.com:feross/webtorrent-desktop.git","clone_url":"https://github.com/feross/webtorrent-desktop.git","svn_url":"https://github.com/feross/webtorrent-desktop","homepage":"https://webtorrent.io/desktop","size":92906,"stargazers_count":2382,"watchers_count":2382,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":223,"mirror_url":null,"open_issues_count":74,"forks":223,"open_issues":74,"watchers":2382,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995"},"html":{"href":"https://github.com/feross/webtorrent-desktop/pull/995"},"issue":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/issues/995"},"comments":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/issues/995/comments"},"review_comments":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995/comments"},"review_comment":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/pulls/995/commits"},"statuses":{"href":"https://api.github.com/repos/feross/webtorrent-desktop/statuses/0d175a7b260098209327616ae70bad451aa3e9bf"}}}}
{"actor":{"display_login":"demoneaux"}}