{"action":"opened","number":6017,"pull_request":{"url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/6017","id":190044395,"html_url":"https://github.com/ReactiveX/RxJava/pull/6017","diff_url":"https://github.com/ReactiveX/RxJava/pull/6017.diff","patch_url":"https://github.com/ReactiveX/RxJava/pull/6017.patch","issue_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/6017","number":6017,"state":"open","locked":false,"title":"2.x: benchmark (0..1).flatMap and flattenAs performance","user":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars2.githubusercontent.com/u/1269832?v=4","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"body":"This PR adds JMH benchmarks to measure the overhead of `{Single|Maybe}.flatMap{Publisher|Observable}`, `{Single|Maybe}.flattenAs{Flowable|Observable}` and `Completable.andThen({Publisher|Observable})`.\r\n\r\n### Results \r\n\r\non i7 4770K, Windows 7 x64, Java 8u172, JMH 1.20 (larger is better):\r\n\r\n#### comparing based on the final output type\r\n\r\n![image](https://user-images.githubusercontent.com/1269832/40439189-7effb8b6-5eba-11e8-9581-8bec8d770f40.png)\r\n\r\nObservable should be generally lower overhead yet some cases it has more overhead.\r\n\r\n#### comparing what to flatten\r\n\r\n(**flatMapHide** = without fusion, **flatMap** = reactive source, **flattenAs** = list source)\r\n\r\n![image](https://user-images.githubusercontent.com/1269832/40439286-c07cf2ae-5eba-11e8-9692-4f6836f8b6cd.png)\r\n\r\nThe **hide** case is expected to have the most overhead, yet the two reactive classes have uneven boosts with a supposedly fuseable cases:\r\n\r\n![image](https://user-images.githubusercontent.com/1269832/40439592-ab3a8388-5ebb-11e8-9e4b-a0b4109452ce.png)\r\n\r\n#### comparing based on source type\r\n\r\n![image](https://user-images.githubusercontent.com/1269832/40439448-3e4cfa08-5ebb-11e8-9655-14c4f097a3bc.png)\r\n\r\n`Single` and `Maybe` should be practically the same here, yet in some cases `Maybe` is quite worse. Also `Completable` should effectively win over the others on each line.\r\n\r\n\r\n-------\r\n\r\nPlenty of optimization opportunities.","created_at":"2018-05-23T17:04:31Z","updated_at":"2018-05-23T17:04:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":480313802,"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/2.x","name":"2.x","color":"af40af","default":false},{"id":258447652,"url":"https://api.github.com/repos/ReactiveX/RxJava/labels/Performance","name":"Performance","color":"009800","default":false}],"milestone":{"url":"https://api.github.com/repos/ReactiveX/RxJava/milestones/24","html_url":"https://github.com/ReactiveX/RxJava/milestone/24","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/milestones/24/labels","id":2523573,"number":24,"title":"2.2","description":"Fixes, enhancements targeting version 2.2.0","creator":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars2.githubusercontent.com/u/1269832?v=4","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":209,"state":"open","created_at":"2017-05-16T09:27:43Z","updated_at":"2018-05-23T17:04:31Z","due_on":"2018-06-30T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/6017/commits","review_comments_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/6017/comments","review_comment_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/6017/comments","statuses_url":"https://api.github.com/repos/ReactiveX/RxJava/statuses/b428b9f70a28bb43aaa40e7e238ac5ba2c86d6b0","head":{"label":"akarnokd:BinaryFlatMapPerf","ref":"BinaryFlatMapPerf","sha":"b428b9f70a28bb43aaa40e7e238ac5ba2c86d6b0","user":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars2.githubusercontent.com/u/1269832?v=4","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"repo":{"id":14518033,"name":"RxJava","full_name":"akarnokd/RxJava","owner":{"login":"akarnokd","id":1269832,"avatar_url":"https://avatars2.githubusercontent.com/u/1269832?v=4","gravatar_id":"","url":"https://api.github.com/users/akarnokd","html_url":"https://github.com/akarnokd","followers_url":"https://api.github.com/users/akarnokd/followers","following_url":"https://api.github.com/users/akarnokd/following{/other_user}","gists_url":"https://api.github.com/users/akarnokd/gists{/gist_id}","starred_url":"https://api.github.com/users/akarnokd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akarnokd/subscriptions","organizations_url":"https://api.github.com/users/akarnokd/orgs","repos_url":"https://api.github.com/users/akarnokd/repos","events_url":"https://api.github.com/users/akarnokd/events{/privacy}","received_events_url":"https://api.github.com/users/akarnokd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/akarnokd/RxJava","description":"RxJava - a library for composing asynchronous and event-based programs using observable sequences for the Java VM.","fork":true,"url":"https://api.github.com/repos/akarnokd/RxJava","forks_url":"https://api.github.com/repos/akarnokd/RxJava/forks","keys_url":"https://api.github.com/repos/akarnokd/RxJava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akarnokd/RxJava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akarnokd/RxJava/teams","hooks_url":"https://api.github.com/repos/akarnokd/RxJava/hooks","issue_events_url":"https://api.github.com/repos/akarnokd/RxJava/issues/events{/number}","events_url":"https://api.github.com/repos/akarnokd/RxJava/events","assignees_url":"https://api.github.com/repos/akarnokd/RxJava/assignees{/user}","branches_url":"https://api.github.com/repos/akarnokd/RxJava/branches{/branch}","tags_url":"https://api.github.com/repos/akarnokd/RxJava/tags","blobs_url":"https://api.github.com/repos/akarnokd/RxJava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akarnokd/RxJava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akarnokd/RxJava/git/refs{/sha}","trees_url":"https://api.github.com/repos/akarnokd/RxJava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akarnokd/RxJava/statuses/{sha}","languages_url":"https://api.github.com/repos/akarnokd/RxJava/languages","stargazers_url":"https://api.github.com/repos/akarnokd/RxJava/stargazers","contributors_url":"https://api.github.com/repos/akarnokd/RxJava/contributors","subscribers_url":"https://api.github.com/repos/akarnokd/RxJava/subscribers","subscription_url":"https://api.github.com/repos/akarnokd/RxJava/subscription","commits_url":"https://api.github.com/repos/akarnokd/RxJava/commits{/sha}","git_commits_url":"https://api.github.com/repos/akarnokd/RxJava/git/commits{/sha}","comments_url":"https://api.github.com/repos/akarnokd/RxJava/comments{/number}","issue_comment_url":"https://api.github.com/repos/akarnokd/RxJava/issues/comments{/number}","contents_url":"https://api.github.com/repos/akarnokd/RxJava/contents/{+path}","compare_url":"https://api.github.com/repos/akarnokd/RxJava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akarnokd/RxJava/merges","archive_url":"https://api.github.com/repos/akarnokd/RxJava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akarnokd/RxJava/downloads","issues_url":"https://api.github.com/repos/akarnokd/RxJava/issues{/number}","pulls_url":"https://api.github.com/repos/akarnokd/RxJava/pulls{/number}","milestones_url":"https://api.github.com/repos/akarnokd/RxJava/milestones{/number}","notifications_url":"https://api.github.com/repos/akarnokd/RxJava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akarnokd/RxJava/labels{/name}","releases_url":"https://api.github.com/repos/akarnokd/RxJava/releases{/id}","deployments_url":"https://api.github.com/repos/akarnokd/RxJava/deployments","created_at":"2013-11-19T08:04:52Z","updated_at":"2018-03-15T10:17:46Z","pushed_at":"2018-05-23T16:50:14Z","git_url":"git://github.com/akarnokd/RxJava.git","ssh_url":"git@github.com:akarnokd/RxJava.git","clone_url":"https://github.com/akarnokd/RxJava.git","svn_url":"https://github.com/akarnokd/RxJava","homepage":"","size":30787,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":0,"watchers":3,"default_branch":"2.x"}},"base":{"label":"ReactiveX:2.x","ref":"2.x","sha":"9ff403e1a4cc6cbd209d5468583c4177d7e64d5e","user":{"login":"ReactiveX","id":6407041,"avatar_url":"https://avatars1.githubusercontent.com/u/6407041?v=4","gravatar_id":"","url":"https://api.github.com/users/ReactiveX","html_url":"https://github.com/ReactiveX","followers_url":"https://api.github.com/users/ReactiveX/followers","following_url":"https://api.github.com/users/ReactiveX/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveX/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveX/subscriptions","organizations_url":"https://api.github.com/users/ReactiveX/orgs","repos_url":"https://api.github.com/users/ReactiveX/repos","events_url":"https://api.github.com/users/ReactiveX/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveX/received_events","type":"Organization","site_admin":false},"repo":{"id":7508411,"name":"RxJava","full_name":"ReactiveX/RxJava","owner":{"login":"ReactiveX","id":6407041,"avatar_url":"https://avatars1.githubusercontent.com/u/6407041?v=4","gravatar_id":"","url":"https://api.github.com/users/ReactiveX","html_url":"https://github.com/ReactiveX","followers_url":"https://api.github.com/users/ReactiveX/followers","following_url":"https://api.github.com/users/ReactiveX/following{/other_user}","gists_url":"https://api.github.com/users/ReactiveX/gists{/gist_id}","starred_url":"https://api.github.com/users/ReactiveX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReactiveX/subscriptions","organizations_url":"https://api.github.com/users/ReactiveX/orgs","repos_url":"https://api.github.com/users/ReactiveX/repos","events_url":"https://api.github.com/users/ReactiveX/events{/privacy}","received_events_url":"https://api.github.com/users/ReactiveX/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ReactiveX/RxJava","description":"RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.","fork":false,"url":"https://api.github.com/repos/ReactiveX/RxJava","forks_url":"https://api.github.com/repos/ReactiveX/RxJava/forks","keys_url":"https://api.github.com/repos/ReactiveX/RxJava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReactiveX/RxJava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReactiveX/RxJava/teams","hooks_url":"https://api.github.com/repos/ReactiveX/RxJava/hooks","issue_events_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/events{/number}","events_url":"https://api.github.com/repos/ReactiveX/RxJava/events","assignees_url":"https://api.github.com/repos/ReactiveX/RxJava/assignees{/user}","branches_url":"https://api.github.com/repos/ReactiveX/RxJava/branches{/branch}","tags_url":"https://api.github.com/repos/ReactiveX/RxJava/tags","blobs_url":"https://api.github.com/repos/ReactiveX/RxJava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReactiveX/RxJava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReactiveX/RxJava/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReactiveX/RxJava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReactiveX/RxJava/statuses/{sha}","languages_url":"https://api.github.com/repos/ReactiveX/RxJava/languages","stargazers_url":"https://api.github.com/repos/ReactiveX/RxJava/stargazers","contributors_url":"https://api.github.com/repos/ReactiveX/RxJava/contributors","subscribers_url":"https://api.github.com/repos/ReactiveX/RxJava/subscribers","subscription_url":"https://api.github.com/repos/ReactiveX/RxJava/subscription","commits_url":"https://api.github.com/repos/ReactiveX/RxJava/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReactiveX/RxJava/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReactiveX/RxJava/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReactiveX/RxJava/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReactiveX/RxJava/contents/{+path}","compare_url":"https://api.github.com/repos/ReactiveX/RxJava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReactiveX/RxJava/merges","archive_url":"https://api.github.com/repos/ReactiveX/RxJava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReactiveX/RxJava/downloads","issues_url":"https://api.github.com/repos/ReactiveX/RxJava/issues{/number}","pulls_url":"https://api.github.com/repos/ReactiveX/RxJava/pulls{/number}","milestones_url":"https://api.github.com/repos/ReactiveX/RxJava/milestones{/number}","notifications_url":"https://api.github.com/repos/ReactiveX/RxJava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReactiveX/RxJava/labels{/name}","releases_url":"https://api.github.com/repos/ReactiveX/RxJava/releases{/id}","deployments_url":"https://api.github.com/repos/ReactiveX/RxJava/deployments","created_at":"2013-01-08T20:11:48Z","updated_at":"2018-05-23T15:18:06Z","pushed_at":"2018-05-23T07:53:04Z","git_url":"git://github.com/ReactiveX/RxJava.git","ssh_url":"git@github.com:ReactiveX/RxJava.git","clone_url":"https://github.com/ReactiveX/RxJava.git","svn_url":"https://github.com/ReactiveX/RxJava","homepage":"","size":54453,"stargazers_count":33175,"watchers_count":33175,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5799,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":5799,"open_issues":37,"watchers":33175,"default_branch":"2.x"}},"_links":{"self":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/6017"},"html":{"href":"https://github.com/ReactiveX/RxJava/pull/6017"},"issue":{"href":"https://api.github.com/repos/ReactiveX/RxJava/issues/6017"},"comments":{"href":"https://api.github.com/repos/ReactiveX/RxJava/issues/6017/comments"},"review_comments":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/6017/comments"},"review_comment":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReactiveX/RxJava/pulls/6017/commits"},"statuses":{"href":"https://api.github.com/repos/ReactiveX/RxJava/statuses/b428b9f70a28bb43aaa40e7e238ac5ba2c86d6b0"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":275,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"akarnokd"}}