{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react-native/pulls/comments/48197805","id":48197805,"diff_hunk":"@@ -293,16 +293,16 @@ class File {\n   }\n \n   getFiles() {\n-    const files = [];\n-    Object.keys(this.children).forEach(key => {\n+    const files = Object.keys(this.children).map(key => {\n       const file = this.children[key];\n       if (file.isDir) {\n-        files.push(...file.getFiles());\n-      } else {\n-        files.push(file);\n+        return file.getFiles();","path":"packager/react-packager/src/DependencyResolver/fastfs.js","position":12,"original_position":12,"commit_id":"319c1201f482e573c3353c14c4bc85c525bc5367","original_commit_id":"319c1201f482e573c3353c14c4bc85c525bc5367","user":{"login":"ide","id":379606,"avatar_url":"https://avatars.githubusercontent.com/u/379606?v=3","gravatar_id":"","url":"https://api.github.com/users/ide","html_url":"https://github.com/ide","followers_url":"https://api.github.com/users/ide/followers","following_url":"https://api.github.com/users/ide/following{/other_user}","gists_url":"https://api.github.com/users/ide/gists{/gist_id}","starred_url":"https://api.github.com/users/ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ide/subscriptions","organizations_url":"https://api.github.com/users/ide/orgs","repos_url":"https://api.github.com/users/ide/repos","events_url":"https://api.github.com/users/ide/events{/privacy}","received_events_url":"https://api.github.com/users/ide/received_events","type":"User","site_admin":false},"body":"@cpojer philikon's approach is simple to read and should be close to optimal. Calling `concat` many times on arrays with > 100k elements is going to invoke a lot of extra copying unless V8 is using persistent data structures or CoW under the hood.","created_at":"2015-12-21T22:04:07Z","updated_at":"2015-12-21T22:04:07Z","html_url":"https://github.com/facebook/react-native/pull/4880#discussion_r48197805","pull_request_url":"https://api.github.com/repos/facebook/react-native/pulls/4880","_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments/48197805"},"html":{"href":"https://github.com/facebook/react-native/pull/4880#discussion_r48197805"},"pull_request":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4880"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/4880","id":54190919,"html_url":"https://github.com/facebook/react-native/pull/4880","diff_url":"https://github.com/facebook/react-native/pull/4880.diff","patch_url":"https://github.com/facebook/react-native/pull/4880.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/4880","number":4880,"state":"open","locked":false,"title":"Improvements to the packager for very large projects","user":{"login":"philikon","id":54918,"avatar_url":"https://avatars.githubusercontent.com/u/54918?v=3","gravatar_id":"","url":"https://api.github.com/users/philikon","html_url":"https://github.com/philikon","followers_url":"https://api.github.com/users/philikon/followers","following_url":"https://api.github.com/users/philikon/following{/other_user}","gists_url":"https://api.github.com/users/philikon/gists{/gist_id}","starred_url":"https://api.github.com/users/philikon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philikon/subscriptions","organizations_url":"https://api.github.com/users/philikon/orgs","repos_url":"https://api.github.com/users/philikon/repos","events_url":"https://api.github.com/users/philikon/events{/privacy}","received_events_url":"https://api.github.com/users/philikon/received_events","type":"User","site_admin":false},"body":"Here are some small fixes for issues we've encountered with very large RN projects (mostly huge dependency trees in `node_modules`).\r\n\r\ncc @amasad @martinbigio ","created_at":"2015-12-20T01:49:31Z","updated_at":"2015-12-21T22:04:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ff820d96325336f4a3416eead5c672d27eb3203","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/4880/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/4880/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/4880/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/319c1201f482e573c3353c14c4bc85c525bc5367","head":{"label":"philikon:packager_improvements","ref":"packager_improvements","sha":"319c1201f482e573c3353c14c4bc85c525bc5367","user":{"login":"philikon","id":54918,"avatar_url":"https://avatars.githubusercontent.com/u/54918?v=3","gravatar_id":"","url":"https://api.github.com/users/philikon","html_url":"https://github.com/philikon","followers_url":"https://api.github.com/users/philikon/followers","following_url":"https://api.github.com/users/philikon/following{/other_user}","gists_url":"https://api.github.com/users/philikon/gists{/gist_id}","starred_url":"https://api.github.com/users/philikon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philikon/subscriptions","organizations_url":"https://api.github.com/users/philikon/orgs","repos_url":"https://api.github.com/users/philikon/repos","events_url":"https://api.github.com/users/philikon/events{/privacy}","received_events_url":"https://api.github.com/users/philikon/received_events","type":"User","site_admin":false},"repo":{"id":35973887,"name":"react-native","full_name":"philikon/react-native","owner":{"login":"philikon","id":54918,"avatar_url":"https://avatars.githubusercontent.com/u/54918?v=3","gravatar_id":"","url":"https://api.github.com/users/philikon","html_url":"https://github.com/philikon","followers_url":"https://api.github.com/users/philikon/followers","following_url":"https://api.github.com/users/philikon/following{/other_user}","gists_url":"https://api.github.com/users/philikon/gists{/gist_id}","starred_url":"https://api.github.com/users/philikon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philikon/subscriptions","organizations_url":"https://api.github.com/users/philikon/orgs","repos_url":"https://api.github.com/users/philikon/repos","events_url":"https://api.github.com/users/philikon/events{/privacy}","received_events_url":"https://api.github.com/users/philikon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/philikon/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/philikon/react-native","forks_url":"https://api.github.com/repos/philikon/react-native/forks","keys_url":"https://api.github.com/repos/philikon/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/philikon/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/philikon/react-native/teams","hooks_url":"https://api.github.com/repos/philikon/react-native/hooks","issue_events_url":"https://api.github.com/repos/philikon/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/philikon/react-native/events","assignees_url":"https://api.github.com/repos/philikon/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/philikon/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/philikon/react-native/tags","blobs_url":"https://api.github.com/repos/philikon/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/philikon/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/philikon/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/philikon/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/philikon/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/philikon/react-native/languages","stargazers_url":"https://api.github.com/repos/philikon/react-native/stargazers","contributors_url":"https://api.github.com/repos/philikon/react-native/contributors","subscribers_url":"https://api.github.com/repos/philikon/react-native/subscribers","subscription_url":"https://api.github.com/repos/philikon/react-native/subscription","commits_url":"https://api.github.com/repos/philikon/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/philikon/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/philikon/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/philikon/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/philikon/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/philikon/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/philikon/react-native/merges","archive_url":"https://api.github.com/repos/philikon/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/philikon/react-native/downloads","issues_url":"https://api.github.com/repos/philikon/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/philikon/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/philikon/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/philikon/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/philikon/react-native/labels{/name}","releases_url":"https://api.github.com/repos/philikon/react-native/releases{/id}","created_at":"2015-05-20T20:58:44Z","updated_at":"2015-05-20T20:58:46Z","pushed_at":"2015-12-21T20:27:19Z","git_url":"git://github.com/philikon/react-native.git","ssh_url":"git@github.com:philikon/react-native.git","clone_url":"https://github.com/philikon/react-native.git","svn_url":"https://github.com/philikon/react-native","homepage":"http://facebook.github.io/react-native/","size":31802,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"6c02d5b14b7ef0ab4a2f94fb714550b2e8ec5431","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","created_at":"2015-01-09T18:10:16Z","updated_at":"2015-12-21T21:14:35Z","pushed_at":"2015-12-21T21:24:16Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":66759,"stargazers_count":24250,"watchers_count":24250,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4054,"mirror_url":null,"open_issues_count":1109,"forks":4054,"open_issues":1109,"watchers":24250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4880"},"html":{"href":"https://github.com/facebook/react-native/pull/4880"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/4880"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/4880/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4880/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/4880/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/319c1201f482e573c3353c14c4bc85c525bc5367"}}}}