{"action":"closed","issue":{"url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1447","repository_url":"https://api.github.com/repos/Reactive-Extensions/RxJS","labels_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1447/labels{/name}","comments_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1447/comments","events_url":"https://api.github.com/repos/Reactive-Extensions/RxJS/issues/1447/events","html_url":"https://github.com/Reactive-Extensions/RxJS/issues/1447","id":220523133,"number":1447,"title":"combineLatest resultSelector runs once for every subscription","user":{"login":"zaneadix","id":7071557,"avatar_url":"https://avatars0.githubusercontent.com/u/7071557?v=3","gravatar_id":"","url":"https://api.github.com/users/zaneadix","html_url":"https://github.com/zaneadix","followers_url":"https://api.github.com/users/zaneadix/followers","following_url":"https://api.github.com/users/zaneadix/following{/other_user}","gists_url":"https://api.github.com/users/zaneadix/gists{/gist_id}","starred_url":"https://api.github.com/users/zaneadix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zaneadix/subscriptions","organizations_url":"https://api.github.com/users/zaneadix/orgs","repos_url":"https://api.github.com/users/zaneadix/repos","events_url":"https://api.github.com/users/zaneadix/events{/privacy}","received_events_url":"https://api.github.com/users/zaneadix/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-10T02:35:47Z","updated_at":"2017-04-10T13:53:57Z","closed_at":"2017-04-10T13:53:57Z","body":"http://jsbin.com/yijurucona/5/edit?js,console,output\r\n\r\nFrom the linked Observable.combineLatest example you can see that .take(4) causes the observable to emit 4 times but because their are 2 subscriptions the resultSelector function is run 8 times (once per update per subscription)\r\n\r\nIs there a reason the resultSelector wouldn't just be run a single time and then have the result of that single execution sent out to subscribers? I'm sure I'm missing something fundamental here but currently I'm using combineLatest with the async pipe in an Angular 2 app and it ends up creating a significant bottleneck when there are a lot of subscriptions within a large template.\r\n\r\nIs there a way to get around this behavior?\r\n\r\n"}}
{"actor":{"display_login":"zaneadix"}}