{"action":"created","comment":{"url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments/153005584","pull_request_review_id":78959147,"id":153005584,"diff_hunk":"@@ -101,8 +101,15 @@ export function newSources(sources: Source[]) {\n       source => !getSource(getState(), source.id)\n     );\n \n+    dispatch({\n+      type: \"ADD_SOURCES\",\n+      sources\n+    });\n+\n     for (const source of filteredSources) {\n-      await dispatch(newSource(source));\n+      await dispatch(loadSourceMap(source));","path":"src/actions/sources.js","position":11,"original_position":11,"commit_id":"f59026d3d047fbbb984580ea2d01a9bc5cb11553","original_commit_id":"f59026d3d047fbbb984580ea2d01a9bc5cb11553","user":{"login":"codehag","id":26968615,"avatar_url":"https://avatars2.githubusercontent.com/u/26968615?v=4","gravatar_id":"","url":"https://api.github.com/users/codehag","html_url":"https://github.com/codehag","followers_url":"https://api.github.com/users/codehag/followers","following_url":"https://api.github.com/users/codehag/following{/other_user}","gists_url":"https://api.github.com/users/codehag/gists{/gist_id}","starred_url":"https://api.github.com/users/codehag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codehag/subscriptions","organizations_url":"https://api.github.com/users/codehag/orgs","repos_url":"https://api.github.com/users/codehag/repos","events_url":"https://api.github.com/users/codehag/events{/privacy}","received_events_url":"https://api.github.com/users/codehag/received_events","type":"User","site_admin":false},"body":"maybe we can send the promises all at once using Promise.all? and if we move to sagas we can use forks","created_at":"2017-11-24T16:52:24Z","updated_at":"2017-11-24T16:52:50Z","html_url":"https://github.com/devtools-html/debugger.html/pull/4749#discussion_r153005584","pull_request_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments/153005584"},"html":{"href":"https://github.com/devtools-html/debugger.html/pull/4749#discussion_r153005584"},"pull_request":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749"}}},"pull_request":{"url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749","id":153686775,"html_url":"https://github.com/devtools-html/debugger.html/pull/4749","diff_url":"https://github.com/devtools-html/debugger.html/pull/4749.diff","patch_url":"https://github.com/devtools-html/debugger.html/pull/4749.patch","issue_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/4749","number":4749,"state":"open","locked":false,"title":"Throttle new sources","user":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"body":"Associated Issue: #4705 \r\n\r\n### Summary of Changes\r\n\r\nThis throttles the firefox newSource event so that we fire at most one newSources action every 50ms. \r\n\r\n* Not sure if we need a test\r\n* Not sure if we want to debounce in the event or the actions. Events seem easier now\r\n\r\nThe performance savings is significant ⏲ \r\n\r\n#### No throttling, w/o the editor fix\r\n\r\n~ 9 seconds. Lots of thrashing here :P\r\n\r\n<img width=\"1269\" alt=\"screen shot 2017-11-20 at 11 44 04 am\" src=\"https://user-images.githubusercontent.com/254562/33030313-012c8098-cde9-11e7-8d0b-41027a0eaa7b.png\">\r\n\r\n#### Throttling w/o the editor fix\r\n\r\n3 seconds. The editor update holds up the main thread so we also do more newSources calls :) vicious cycle\r\n\r\n<img width=\"830\" alt=\"screen shot 2017-11-20 at 11 47 12 am\" src=\"https://user-images.githubusercontent.com/254562/33030451-55745ea0-cde9-11e7-9907-1a91bcb38e55.png\">\r\n\r\n#### Throttling w/ the editor fix\r\n\r\n1.5 sec\r\n\r\n<img width=\"1128\" alt=\"screen shot 2017-11-20 at 11 48 40 am\" src=\"https://user-images.githubusercontent.com/254562/33030462-5cff6908-cde9-11e7-81b4-5a4e345cdfb6.png\">\r\n","created_at":"2017-11-20T17:15:29Z","updated_at":"2017-11-24T16:52:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"efc315599783fa18d04405c255315f753d989a76","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749/commits","review_comments_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749/comments","review_comment_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments{/number}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/4749/comments","statuses_url":"https://api.github.com/repos/devtools-html/debugger.html/statuses/f59026d3d047fbbb984580ea2d01a9bc5cb11553","head":{"label":"jasonLaster:throttle-sources","ref":"throttle-sources","sha":"f59026d3d047fbbb984580ea2d01a9bc5cb11553","user":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"repo":{"id":55007537,"name":"debugger.html","full_name":"jasonLaster/debugger.html","owner":{"login":"jasonLaster","id":254562,"avatar_url":"https://avatars1.githubusercontent.com/u/254562?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonLaster","html_url":"https://github.com/jasonLaster","followers_url":"https://api.github.com/users/jasonLaster/followers","following_url":"https://api.github.com/users/jasonLaster/following{/other_user}","gists_url":"https://api.github.com/users/jasonLaster/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonLaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonLaster/subscriptions","organizations_url":"https://api.github.com/users/jasonLaster/orgs","repos_url":"https://api.github.com/users/jasonLaster/repos","events_url":"https://api.github.com/users/jasonLaster/events{/privacy}","received_events_url":"https://api.github.com/users/jasonLaster/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jasonLaster/debugger.html","description":"Experimental something something.","fork":true,"url":"https://api.github.com/repos/jasonLaster/debugger.html","forks_url":"https://api.github.com/repos/jasonLaster/debugger.html/forks","keys_url":"https://api.github.com/repos/jasonLaster/debugger.html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jasonLaster/debugger.html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jasonLaster/debugger.html/teams","hooks_url":"https://api.github.com/repos/jasonLaster/debugger.html/hooks","issue_events_url":"https://api.github.com/repos/jasonLaster/debugger.html/issues/events{/number}","events_url":"https://api.github.com/repos/jasonLaster/debugger.html/events","assignees_url":"https://api.github.com/repos/jasonLaster/debugger.html/assignees{/user}","branches_url":"https://api.github.com/repos/jasonLaster/debugger.html/branches{/branch}","tags_url":"https://api.github.com/repos/jasonLaster/debugger.html/tags","blobs_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/refs{/sha}","trees_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jasonLaster/debugger.html/statuses/{sha}","languages_url":"https://api.github.com/repos/jasonLaster/debugger.html/languages","stargazers_url":"https://api.github.com/repos/jasonLaster/debugger.html/stargazers","contributors_url":"https://api.github.com/repos/jasonLaster/debugger.html/contributors","subscribers_url":"https://api.github.com/repos/jasonLaster/debugger.html/subscribers","subscription_url":"https://api.github.com/repos/jasonLaster/debugger.html/subscription","commits_url":"https://api.github.com/repos/jasonLaster/debugger.html/commits{/sha}","git_commits_url":"https://api.github.com/repos/jasonLaster/debugger.html/git/commits{/sha}","comments_url":"https://api.github.com/repos/jasonLaster/debugger.html/comments{/number}","issue_comment_url":"https://api.github.com/repos/jasonLaster/debugger.html/issues/comments{/number}","contents_url":"https://api.github.com/repos/jasonLaster/debugger.html/contents/{+path}","compare_url":"https://api.github.com/repos/jasonLaster/debugger.html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jasonLaster/debugger.html/merges","archive_url":"https://api.github.com/repos/jasonLaster/debugger.html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jasonLaster/debugger.html/downloads","issues_url":"https://api.github.com/repos/jasonLaster/debugger.html/issues{/number}","pulls_url":"https://api.github.com/repos/jasonLaster/debugger.html/pulls{/number}","milestones_url":"https://api.github.com/repos/jasonLaster/debugger.html/milestones{/number}","notifications_url":"https://api.github.com/repos/jasonLaster/debugger.html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jasonLaster/debugger.html/labels{/name}","releases_url":"https://api.github.com/repos/jasonLaster/debugger.html/releases{/id}","deployments_url":"https://api.github.com/repos/jasonLaster/debugger.html/deployments","created_at":"2016-03-29T20:14:57Z","updated_at":"2017-11-19T20:54:08Z","pushed_at":"2017-11-23T10:06:36Z","git_url":"git://github.com/jasonLaster/debugger.html.git","ssh_url":"git@github.com:jasonLaster/debugger.html.git","clone_url":"https://github.com/jasonLaster/debugger.html.git","svn_url":"https://github.com/jasonLaster/debugger.html","homepage":null,"size":28644,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"devtools-html:master","ref":"master","sha":"11dc3161e3e39159e9fa2520b76f5a5d0a0783b8","user":{"login":"devtools-html","id":19979421,"avatar_url":"https://avatars2.githubusercontent.com/u/19979421?v=4","gravatar_id":"","url":"https://api.github.com/users/devtools-html","html_url":"https://github.com/devtools-html","followers_url":"https://api.github.com/users/devtools-html/followers","following_url":"https://api.github.com/users/devtools-html/following{/other_user}","gists_url":"https://api.github.com/users/devtools-html/gists{/gist_id}","starred_url":"https://api.github.com/users/devtools-html/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtools-html/subscriptions","organizations_url":"https://api.github.com/users/devtools-html/orgs","repos_url":"https://api.github.com/users/devtools-html/repos","events_url":"https://api.github.com/users/devtools-html/events{/privacy}","received_events_url":"https://api.github.com/users/devtools-html/received_events","type":"Organization","site_admin":false},"repo":{"id":54585418,"name":"debugger.html","full_name":"devtools-html/debugger.html","owner":{"login":"devtools-html","id":19979421,"avatar_url":"https://avatars2.githubusercontent.com/u/19979421?v=4","gravatar_id":"","url":"https://api.github.com/users/devtools-html","html_url":"https://github.com/devtools-html","followers_url":"https://api.github.com/users/devtools-html/followers","following_url":"https://api.github.com/users/devtools-html/following{/other_user}","gists_url":"https://api.github.com/users/devtools-html/gists{/gist_id}","starred_url":"https://api.github.com/users/devtools-html/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devtools-html/subscriptions","organizations_url":"https://api.github.com/users/devtools-html/orgs","repos_url":"https://api.github.com/users/devtools-html/repos","events_url":"https://api.github.com/users/devtools-html/events{/privacy}","received_events_url":"https://api.github.com/users/devtools-html/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/devtools-html/debugger.html","description":"The Firefox debugger that works anywhere  :boom:","fork":false,"url":"https://api.github.com/repos/devtools-html/debugger.html","forks_url":"https://api.github.com/repos/devtools-html/debugger.html/forks","keys_url":"https://api.github.com/repos/devtools-html/debugger.html/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devtools-html/debugger.html/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devtools-html/debugger.html/teams","hooks_url":"https://api.github.com/repos/devtools-html/debugger.html/hooks","issue_events_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/events{/number}","events_url":"https://api.github.com/repos/devtools-html/debugger.html/events","assignees_url":"https://api.github.com/repos/devtools-html/debugger.html/assignees{/user}","branches_url":"https://api.github.com/repos/devtools-html/debugger.html/branches{/branch}","tags_url":"https://api.github.com/repos/devtools-html/debugger.html/tags","blobs_url":"https://api.github.com/repos/devtools-html/debugger.html/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devtools-html/debugger.html/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devtools-html/debugger.html/git/refs{/sha}","trees_url":"https://api.github.com/repos/devtools-html/debugger.html/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devtools-html/debugger.html/statuses/{sha}","languages_url":"https://api.github.com/repos/devtools-html/debugger.html/languages","stargazers_url":"https://api.github.com/repos/devtools-html/debugger.html/stargazers","contributors_url":"https://api.github.com/repos/devtools-html/debugger.html/contributors","subscribers_url":"https://api.github.com/repos/devtools-html/debugger.html/subscribers","subscription_url":"https://api.github.com/repos/devtools-html/debugger.html/subscription","commits_url":"https://api.github.com/repos/devtools-html/debugger.html/commits{/sha}","git_commits_url":"https://api.github.com/repos/devtools-html/debugger.html/git/commits{/sha}","comments_url":"https://api.github.com/repos/devtools-html/debugger.html/comments{/number}","issue_comment_url":"https://api.github.com/repos/devtools-html/debugger.html/issues/comments{/number}","contents_url":"https://api.github.com/repos/devtools-html/debugger.html/contents/{+path}","compare_url":"https://api.github.com/repos/devtools-html/debugger.html/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devtools-html/debugger.html/merges","archive_url":"https://api.github.com/repos/devtools-html/debugger.html/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devtools-html/debugger.html/downloads","issues_url":"https://api.github.com/repos/devtools-html/debugger.html/issues{/number}","pulls_url":"https://api.github.com/repos/devtools-html/debugger.html/pulls{/number}","milestones_url":"https://api.github.com/repos/devtools-html/debugger.html/milestones{/number}","notifications_url":"https://api.github.com/repos/devtools-html/debugger.html/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devtools-html/debugger.html/labels{/name}","releases_url":"https://api.github.com/repos/devtools-html/debugger.html/releases{/id}","deployments_url":"https://api.github.com/repos/devtools-html/debugger.html/deployments","created_at":"2016-03-23T18:55:36Z","updated_at":"2017-11-24T16:52:25Z","pushed_at":"2017-11-24T15:48:23Z","git_url":"git://github.com/devtools-html/debugger.html.git","ssh_url":"git@github.com:devtools-html/debugger.html.git","clone_url":"https://github.com/devtools-html/debugger.html.git","svn_url":"https://github.com/devtools-html/debugger.html","homepage":"https://devtools-html.github.io/debugger.html/","size":13431,"stargazers_count":3159,"watchers_count":3159,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":477,"mirror_url":null,"archived":false,"open_issues_count":219,"forks":477,"open_issues":219,"watchers":3159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749"},"html":{"href":"https://github.com/devtools-html/debugger.html/pull/4749"},"issue":{"href":"https://api.github.com/repos/devtools-html/debugger.html/issues/4749"},"comments":{"href":"https://api.github.com/repos/devtools-html/debugger.html/issues/4749/comments"},"review_comments":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749/comments"},"review_comment":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/devtools-html/debugger.html/pulls/4749/commits"},"statuses":{"href":"https://api.github.com/repos/devtools-html/debugger.html/statuses/f59026d3d047fbbb984580ea2d01a9bc5cb11553"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"codehag"}}