{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/10309","labels_url":"https://api.github.com/repos/emberjs/ember.js/issues/10309/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/10309/comments","events_url":"https://api.github.com/repos/emberjs/ember.js/issues/10309/events","html_url":"https://github.com/emberjs/ember.js/issues/10309","id":55923965,"number":10309,"title":"Chained computed map properties run map function too often","user":{"login":"WCPetersen","id":669503,"avatar_url":"https://avatars.githubusercontent.com/u/669503?v=3","gravatar_id":"","url":"https://api.github.com/users/WCPetersen","html_url":"https://github.com/WCPetersen","followers_url":"https://api.github.com/users/WCPetersen/followers","following_url":"https://api.github.com/users/WCPetersen/following{/other_user}","gists_url":"https://api.github.com/users/WCPetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/WCPetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WCPetersen/subscriptions","organizations_url":"https://api.github.com/users/WCPetersen/orgs","repos_url":"https://api.github.com/users/WCPetersen/repos","events_url":"https://api.github.com/users/WCPetersen/events{/privacy}","received_events_url":"https://api.github.com/users/WCPetersen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/emberjs/ember.js/labels/Performance","name":"Performance","color":"DDDDDD"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-29T16:44:02Z","updated_at":"2015-07-11T06:33:31Z","closed_at":"2015-07-11T06:33:31Z","body":"When computed map properties are chained together, the later properties call their map functions too often. It gets worse as the chain gets longer. I've created a [JS bin](http://jsbin.com/taxevoyoqa/1/edit?html,js,output) to demonstrate the issue.\r\n\r\nThere are really two problems. First, events are getting multiplied as they go down the chain. Second, the map functions are getting called on items which are about to be removed.\r\n\r\nI can understand why you might need to trigger extra events on the first map property, but I don't think they should multiply as they go down the chain. I'm betting it's the extra events that are causing the items to get re-mapped so often."},"comment":{"url":"https://api.github.com/repos/emberjs/ember.js/issues/comments/120586950","html_url":"https://github.com/emberjs/ember.js/issues/10309#issuecomment-120586950","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/10309","id":120586950,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T06:33:31Z","updated_at":"2015-07-11T06:33:31Z","body":"reduce computed / array computed have been overhauled in 2.0. They are implement now as simple CPs, so the lazy semantics should be correctly preserved all the way down."}}