{"action":"opened","number":75,"pull_request":{"url":"https://api.github.com/repos/variety/variety/pulls/75","id":30220772,"html_url":"https://github.com/variety/variety/pull/75","diff_url":"https://github.com/variety/variety/pull/75.diff","patch_url":"https://github.com/variety/variety/pull/75.patch","issue_url":"https://api.github.com/repos/variety/variety/issues/75","number":75,"state":"open","locked":false,"title":"Performance fix","user":{"login":"todvora","id":4102775,"avatar_url":"https://avatars.githubusercontent.com/u/4102775?v=3","gravatar_id":"","url":"https://api.github.com/users/todvora","html_url":"https://github.com/todvora","followers_url":"https://api.github.com/users/todvora/followers","following_url":"https://api.github.com/users/todvora/following{/other_user}","gists_url":"https://api.github.com/users/todvora/gists{/gist_id}","starred_url":"https://api.github.com/users/todvora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todvora/subscriptions","organizations_url":"https://api.github.com/users/todvora/orgs","repos_url":"https://api.github.com/users/todvora/repos","events_url":"https://api.github.com/users/todvora/events{/privacy}","received_events_url":"https://api.github.com/users/todvora/received_events","type":"User","site_admin":false},"body":"Hi,\r\nI found out, that the processing pipe is complete performance killer. For small collections is it good enough. But analysis of collection with 500 000 results and enough keys never finishes. I compared results of analysis based on this [source collection](http://mongodb-enron-email.s3-website-us-east-1.amazonaws.com/).\r\n\r\nBefore the [wrong percentage indications in unnamed objects](https://github.com/variety/variety/commit/dd9b069a8aa6c36dd44208eac4276907725299b2) took Variety +- 50s to finish. After fix was it almost 2x more. And the pipe refactoring killed it totally. \r\n\r\nI didn't realized, that JS behaves differently than Java 8 Streams. In Java, the pipe/stream is processed lazilly. In JS is first computed the whole array of results and then send to the next method in the row. JS then built giant arrays and took to much memory and time. \r\n\r\nSo I had to rewrite processing one more time, excluding those giant arrays. It lost little bit of elegance, but still passing all tests and performance is the same or better than before unnamed objects fix. The sampling could be still very easily in the reduce method. \r\n\r\nI am sorry to bother you once more time, but could you look at the code and review it?\r\n\r\nThank you,\r\nTomas\r\n\r\n","created_at":"2015-02-28T07:55:03Z","updated_at":"2015-02-28T07:55:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/variety/variety/pulls/75/commits","review_comments_url":"https://api.github.com/repos/variety/variety/pulls/75/comments","review_comment_url":"https://api.github.com/repos/variety/variety/pulls/comments{/number}","comments_url":"https://api.github.com/repos/variety/variety/issues/75/comments","statuses_url":"https://api.github.com/repos/variety/variety/statuses/88d00d2875bc8a5bb4115c26dce34eff9ceb8990","head":{"label":"todvora:master","ref":"master","sha":"88d00d2875bc8a5bb4115c26dce34eff9ceb8990","user":{"login":"todvora","id":4102775,"avatar_url":"https://avatars.githubusercontent.com/u/4102775?v=3","gravatar_id":"","url":"https://api.github.com/users/todvora","html_url":"https://github.com/todvora","followers_url":"https://api.github.com/users/todvora/followers","following_url":"https://api.github.com/users/todvora/following{/other_user}","gists_url":"https://api.github.com/users/todvora/gists{/gist_id}","starred_url":"https://api.github.com/users/todvora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todvora/subscriptions","organizations_url":"https://api.github.com/users/todvora/orgs","repos_url":"https://api.github.com/users/todvora/repos","events_url":"https://api.github.com/users/todvora/events{/privacy}","received_events_url":"https://api.github.com/users/todvora/received_events","type":"User","site_admin":false},"repo":{"id":20359399,"name":"variety","full_name":"todvora/variety","owner":{"login":"todvora","id":4102775,"avatar_url":"https://avatars.githubusercontent.com/u/4102775?v=3","gravatar_id":"","url":"https://api.github.com/users/todvora","html_url":"https://github.com/todvora","followers_url":"https://api.github.com/users/todvora/followers","following_url":"https://api.github.com/users/todvora/following{/other_user}","gists_url":"https://api.github.com/users/todvora/gists{/gist_id}","starred_url":"https://api.github.com/users/todvora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todvora/subscriptions","organizations_url":"https://api.github.com/users/todvora/orgs","repos_url":"https://api.github.com/users/todvora/repos","events_url":"https://api.github.com/users/todvora/events{/privacy}","received_events_url":"https://api.github.com/users/todvora/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/todvora/variety","description":"A schema analyzer for MongoDB","fork":true,"url":"https://api.github.com/repos/todvora/variety","forks_url":"https://api.github.com/repos/todvora/variety/forks","keys_url":"https://api.github.com/repos/todvora/variety/keys{/key_id}","collaborators_url":"https://api.github.com/repos/todvora/variety/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/todvora/variety/teams","hooks_url":"https://api.github.com/repos/todvora/variety/hooks","issue_events_url":"https://api.github.com/repos/todvora/variety/issues/events{/number}","events_url":"https://api.github.com/repos/todvora/variety/events","assignees_url":"https://api.github.com/repos/todvora/variety/assignees{/user}","branches_url":"https://api.github.com/repos/todvora/variety/branches{/branch}","tags_url":"https://api.github.com/repos/todvora/variety/tags","blobs_url":"https://api.github.com/repos/todvora/variety/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/todvora/variety/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/todvora/variety/git/refs{/sha}","trees_url":"https://api.github.com/repos/todvora/variety/git/trees{/sha}","statuses_url":"https://api.github.com/repos/todvora/variety/statuses/{sha}","languages_url":"https://api.github.com/repos/todvora/variety/languages","stargazers_url":"https://api.github.com/repos/todvora/variety/stargazers","contributors_url":"https://api.github.com/repos/todvora/variety/contributors","subscribers_url":"https://api.github.com/repos/todvora/variety/subscribers","subscription_url":"https://api.github.com/repos/todvora/variety/subscription","commits_url":"https://api.github.com/repos/todvora/variety/commits{/sha}","git_commits_url":"https://api.github.com/repos/todvora/variety/git/commits{/sha}","comments_url":"https://api.github.com/repos/todvora/variety/comments{/number}","issue_comment_url":"https://api.github.com/repos/todvora/variety/issues/comments{/number}","contents_url":"https://api.github.com/repos/todvora/variety/contents/{+path}","compare_url":"https://api.github.com/repos/todvora/variety/compare/{base}...{head}","merges_url":"https://api.github.com/repos/todvora/variety/merges","archive_url":"https://api.github.com/repos/todvora/variety/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/todvora/variety/downloads","issues_url":"https://api.github.com/repos/todvora/variety/issues{/number}","pulls_url":"https://api.github.com/repos/todvora/variety/pulls{/number}","milestones_url":"https://api.github.com/repos/todvora/variety/milestones{/number}","notifications_url":"https://api.github.com/repos/todvora/variety/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/todvora/variety/labels{/name}","releases_url":"https://api.github.com/repos/todvora/variety/releases{/id}","created_at":"2014-05-31T16:05:17Z","updated_at":"2015-02-28T07:40:56Z","pushed_at":"2015-02-28T07:40:56Z","git_url":"git://github.com/todvora/variety.git","ssh_url":"git@github.com:todvora/variety.git","clone_url":"https://github.com/todvora/variety.git","svn_url":"https://github.com/todvora/variety","homepage":"","size":436,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"variety:master","ref":"master","sha":"7ceeed3e0ce2ad85d029716d923249e278dac300","user":{"login":"variety","id":2047615,"avatar_url":"https://avatars.githubusercontent.com/u/2047615?v=3","gravatar_id":"","url":"https://api.github.com/users/variety","html_url":"https://github.com/variety","followers_url":"https://api.github.com/users/variety/followers","following_url":"https://api.github.com/users/variety/following{/other_user}","gists_url":"https://api.github.com/users/variety/gists{/gist_id}","starred_url":"https://api.github.com/users/variety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/variety/subscriptions","organizations_url":"https://api.github.com/users/variety/orgs","repos_url":"https://api.github.com/users/variety/repos","events_url":"https://api.github.com/users/variety/events{/privacy}","received_events_url":"https://api.github.com/users/variety/received_events","type":"Organization","site_admin":false},"repo":{"id":3769679,"name":"variety","full_name":"variety/variety","owner":{"login":"variety","id":2047615,"avatar_url":"https://avatars.githubusercontent.com/u/2047615?v=3","gravatar_id":"","url":"https://api.github.com/users/variety","html_url":"https://github.com/variety","followers_url":"https://api.github.com/users/variety/followers","following_url":"https://api.github.com/users/variety/following{/other_user}","gists_url":"https://api.github.com/users/variety/gists{/gist_id}","starred_url":"https://api.github.com/users/variety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/variety/subscriptions","organizations_url":"https://api.github.com/users/variety/orgs","repos_url":"https://api.github.com/users/variety/repos","events_url":"https://api.github.com/users/variety/events{/privacy}","received_events_url":"https://api.github.com/users/variety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/variety/variety","description":"A schema analyzer for MongoDB","fork":false,"url":"https://api.github.com/repos/variety/variety","forks_url":"https://api.github.com/repos/variety/variety/forks","keys_url":"https://api.github.com/repos/variety/variety/keys{/key_id}","collaborators_url":"https://api.github.com/repos/variety/variety/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/variety/variety/teams","hooks_url":"https://api.github.com/repos/variety/variety/hooks","issue_events_url":"https://api.github.com/repos/variety/variety/issues/events{/number}","events_url":"https://api.github.com/repos/variety/variety/events","assignees_url":"https://api.github.com/repos/variety/variety/assignees{/user}","branches_url":"https://api.github.com/repos/variety/variety/branches{/branch}","tags_url":"https://api.github.com/repos/variety/variety/tags","blobs_url":"https://api.github.com/repos/variety/variety/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/variety/variety/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/variety/variety/git/refs{/sha}","trees_url":"https://api.github.com/repos/variety/variety/git/trees{/sha}","statuses_url":"https://api.github.com/repos/variety/variety/statuses/{sha}","languages_url":"https://api.github.com/repos/variety/variety/languages","stargazers_url":"https://api.github.com/repos/variety/variety/stargazers","contributors_url":"https://api.github.com/repos/variety/variety/contributors","subscribers_url":"https://api.github.com/repos/variety/variety/subscribers","subscription_url":"https://api.github.com/repos/variety/variety/subscription","commits_url":"https://api.github.com/repos/variety/variety/commits{/sha}","git_commits_url":"https://api.github.com/repos/variety/variety/git/commits{/sha}","comments_url":"https://api.github.com/repos/variety/variety/comments{/number}","issue_comment_url":"https://api.github.com/repos/variety/variety/issues/comments{/number}","contents_url":"https://api.github.com/repos/variety/variety/contents/{+path}","compare_url":"https://api.github.com/repos/variety/variety/compare/{base}...{head}","merges_url":"https://api.github.com/repos/variety/variety/merges","archive_url":"https://api.github.com/repos/variety/variety/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/variety/variety/downloads","issues_url":"https://api.github.com/repos/variety/variety/issues{/number}","pulls_url":"https://api.github.com/repos/variety/variety/pulls{/number}","milestones_url":"https://api.github.com/repos/variety/variety/milestones{/number}","notifications_url":"https://api.github.com/repos/variety/variety/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/variety/variety/labels{/name}","releases_url":"https://api.github.com/repos/variety/variety/releases{/id}","created_at":"2012-03-19T23:03:02Z","updated_at":"2015-02-26T13:08:37Z","pushed_at":"2015-02-25T22:02:54Z","git_url":"git://github.com/variety/variety.git","ssh_url":"git@github.com:variety/variety.git","clone_url":"https://github.com/variety/variety.git","svn_url":"https://github.com/variety/variety","homepage":"","size":693,"stargazers_count":435,"watchers_count":435,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":10,"forks":62,"open_issues":10,"watchers":435,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/variety/variety/pulls/75"},"html":{"href":"https://github.com/variety/variety/pull/75"},"issue":{"href":"https://api.github.com/repos/variety/variety/issues/75"},"comments":{"href":"https://api.github.com/repos/variety/variety/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/variety/variety/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/variety/variety/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/variety/variety/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/variety/variety/statuses/88d00d2875bc8a5bb4115c26dce34eff9ceb8990"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":63,"deletions":38,"changed_files":1}}