{"action":"created","issue":{"url":"https://api.github.com/repos/knockout/knockout/issues/1841","labels_url":"https://api.github.com/repos/knockout/knockout/issues/1841/labels{/name}","comments_url":"https://api.github.com/repos/knockout/knockout/issues/1841/comments","events_url":"https://api.github.com/repos/knockout/knockout/issues/1841/events","html_url":"https://github.com/knockout/knockout/pull/1841","id":100107321,"number":1841,"title":"Faster computeds","user":{"login":"SteveSanderson","id":161375,"avatar_url":"https://avatars.githubusercontent.com/u/161375?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveSanderson","html_url":"https://github.com/SteveSanderson","followers_url":"https://api.github.com/users/SteveSanderson/followers","following_url":"https://api.github.com/users/SteveSanderson/following{/other_user}","gists_url":"https://api.github.com/users/SteveSanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveSanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveSanderson/subscriptions","organizations_url":"https://api.github.com/users/SteveSanderson/orgs","repos_url":"https://api.github.com/users/SteveSanderson/repos","events_url":"https://api.github.com/users/SteveSanderson/events{/privacy}","received_events_url":"https://api.github.com/users/SteveSanderson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/knockout/knockout/labels/affected:%20all","name":"affected: all","color":"00c800"},{"url":"https://api.github.com/repos/knockout/knockout/labels/severity:%20major","name":"severity: major","color":"e14d51"},{"url":"https://api.github.com/repos/knockout/knockout/labels/type:%20feature","name":"type: feature","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/knockout/knockout/milestones/8","html_url":"https://github.com/knockout/knockout/milestones/3.4.0","labels_url":"https://api.github.com/repos/knockout/knockout/milestones/8/labels","id":926494,"number":8,"title":"3.4.0","description":null,"creator":{"login":"brianmhunt","id":135528,"avatar_url":"https://avatars.githubusercontent.com/u/135528?v=3","gravatar_id":"","url":"https://api.github.com/users/brianmhunt","html_url":"https://github.com/brianmhunt","followers_url":"https://api.github.com/users/brianmhunt/followers","following_url":"https://api.github.com/users/brianmhunt/following{/other_user}","gists_url":"https://api.github.com/users/brianmhunt/gists{/gist_id}","starred_url":"https://api.github.com/users/brianmhunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianmhunt/subscriptions","organizations_url":"https://api.github.com/users/brianmhunt/orgs","repos_url":"https://api.github.com/users/brianmhunt/repos","events_url":"https://api.github.com/users/brianmhunt/events{/privacy}","received_events_url":"https://api.github.com/users/brianmhunt/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":30,"state":"open","created_at":"2015-01-08T01:57:00Z","updated_at":"2015-08-10T23:56:18Z","due_on":null,"closed_at":null},"comments":15,"created_at":"2015-08-10T16:23:05Z","updated_at":"2015-08-12T16:03:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/knockout/knockout/pulls/1841","html_url":"https://github.com/knockout/knockout/pull/1841","diff_url":"https://github.com/knockout/knockout/pull/1841.diff","patch_url":"https://github.com/knockout/knockout/pull/1841.patch"},"body":"Similar to #1840, this pull request improves the performance of `ko.computed` initialisation. It reduces the time taken to construct computed instances by about 50%, and perhaps more importantly, reduces the memory overhead to about half of what it was before.\r\n\r\nLike #1840, the approach is mainly to factor out all the closure-captured function instances and put them on the prototype instead.\r\n\r\n### Review notes\r\n\r\nThis change touches (or will touch) nearly every line in `ko.dependentObservable.js`, because it involves factoring out most of the logic inside `ko.computed`. That makes it a bit hard to review - sorry about that - couldn't avoid it! To make it a bit easier to review, I've broken it down into more commits than would be normal. But let me know if you suspect I might have unintentionally changed any behavior. Specs are all still passing.\r\n\r\n### Compatibility\r\n\r\nLike #1840, there should be no compatibility difference, except for scenarios where code does equality comparisons on methods (e.g., `myComputed1.peek === myComputed2.peek` will always be true now). If anyone objects to this, please let us know! (I think we would do it anyway though)\r\n\r\n### Not yet complete!\r\n\r\nThere's still quite a big, confusing mass of setup code relating to dispose handlers. I would like to clean this up further (both for perf, but mainly for readability) but am out of time for today. If anyone else wants to jump in here you'd be welcome :)\r\n"},"comment":{"url":"https://api.github.com/repos/knockout/knockout/issues/comments/130356189","html_url":"https://github.com/knockout/knockout/pull/1841#issuecomment-130356189","issue_url":"https://api.github.com/repos/knockout/knockout/issues/1841","id":130356189,"user":{"login":"rniemeyer","id":412468,"avatar_url":"https://avatars.githubusercontent.com/u/412468?v=3","gravatar_id":"","url":"https://api.github.com/users/rniemeyer","html_url":"https://github.com/rniemeyer","followers_url":"https://api.github.com/users/rniemeyer/followers","following_url":"https://api.github.com/users/rniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/rniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/rniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rniemeyer/subscriptions","organizations_url":"https://api.github.com/users/rniemeyer/orgs","repos_url":"https://api.github.com/users/rniemeyer/repos","events_url":"https://api.github.com/users/rniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/rniemeyer/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T16:03:43Z","updated_at":"2015-08-12T16:03:43Z","body":"Nice work all :+1: "}}