{"action":"created","comment":{"url":"https://api.github.com/repos/knockout/knockout/pulls/comments/31573228","id":31573228,"diff_hunk":"@@ -57,6 +57,34 @@ ko.computed = ko.dependentObservable = function (evaluatorFunctionOrOptions, eva\n         isSleeping = false;\n     }\n \n+    function subscribeToDependency(target) {","path":"src/subscribables/dependentObservable.js","position":4,"original_position":4,"commit_id":"048179c4d366c4a59238528387f64369057789b6","original_commit_id":"048179c4d366c4a59238528387f64369057789b6","user":{"login":"mbest","id":1230364,"avatar_url":"https://avatars.githubusercontent.com/u/1230364?v=3","gravatar_id":"","url":"https://api.github.com/users/mbest","html_url":"https://github.com/mbest","followers_url":"https://api.github.com/users/mbest/followers","following_url":"https://api.github.com/users/mbest/following{/other_user}","gists_url":"https://api.github.com/users/mbest/gists{/gist_id}","starred_url":"https://api.github.com/users/mbest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbest/subscriptions","organizations_url":"https://api.github.com/users/mbest/orgs","repos_url":"https://api.github.com/users/mbest/repos","events_url":"https://api.github.com/users/mbest/events{/privacy}","received_events_url":"https://api.github.com/users/mbest/received_events","type":"User","site_admin":false},"body":"I had originally written this with static functions but then realized I needed to access `target` in one of them. I'll take another look at it, though, to see if there's another way. Also this will only run once for each dependency because when a computed is re-evaluated, it saves and reuses previous subscriptions.","created_at":"2015-06-02T21:27:53Z","updated_at":"2015-06-02T21:27:53Z","html_url":"https://github.com/knockout/knockout/pull/1795#discussion_r31573228","pull_request_url":"https://api.github.com/repos/knockout/knockout/pulls/1795","_links":{"self":{"href":"https://api.github.com/repos/knockout/knockout/pulls/comments/31573228"},"html":{"href":"https://github.com/knockout/knockout/pull/1795#discussion_r31573228"},"pull_request":{"href":"https://api.github.com/repos/knockout/knockout/pulls/1795"}}},"pull_request":{"url":"https://api.github.com/repos/knockout/knockout/pulls/1795","id":35558839,"html_url":"https://github.com/knockout/knockout/pull/1795","diff_url":"https://github.com/knockout/knockout/pull/1795.diff","patch_url":"https://github.com/knockout/knockout/pull/1795.patch","issue_url":"https://api.github.com/repos/knockout/knockout/issues/1795","number":1795,"state":"open","locked":false,"title":"Deferred updates, part 3: dependency tree scheduling","user":{"login":"mbest","id":1230364,"avatar_url":"https://avatars.githubusercontent.com/u/1230364?v=3","gravatar_id":"","url":"https://api.github.com/users/mbest","html_url":"https://github.com/mbest","followers_url":"https://api.github.com/users/mbest/followers","following_url":"https://api.github.com/users/mbest/following{/other_user}","gists_url":"https://api.github.com/users/mbest/gists{/gist_id}","starred_url":"https://api.github.com/users/mbest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbest/subscriptions","organizations_url":"https://api.github.com/users/mbest/orgs","repos_url":"https://api.github.com/users/mbest/repos","events_url":"https://api.github.com/users/mbest/events{/privacy}","received_events_url":"https://api.github.com/users/mbest/received_events","type":"User","site_admin":false},"body":"This is the third, and final, part of supporting deferred updates in Knockout (#1728).\r\n\r\nWith multiple deferred computed observables in a dependency tree, use \"dirty\" events to schedule the complete set of updates in the correct order and mark each computed observable as \"dirty\" so it can be evaluated if needed with the latest value.","created_at":"2015-05-15T23:14:59Z","updated_at":"2015-06-02T21:27:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2c4443e0e58c4bb2851d9c33e1f16cba2768daa","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":21,"closed_issues":21,"state":"open","created_at":"2015-01-08T01:57:00Z","updated_at":"2015-06-02T01:29:59Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/knockout/knockout/pulls/1795/commits","review_comments_url":"https://api.github.com/repos/knockout/knockout/pulls/1795/comments","review_comment_url":"https://api.github.com/repos/knockout/knockout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/knockout/knockout/issues/1795/comments","statuses_url":"https://api.github.com/repos/knockout/knockout/statuses/048179c4d366c4a59238528387f64369057789b6","head":{"label":"knockout:deferred-updates-part-3","ref":"deferred-updates-part-3","sha":"048179c4d366c4a59238528387f64369057789b6","user":{"login":"knockout","id":3863375,"avatar_url":"https://avatars.githubusercontent.com/u/3863375?v=3","gravatar_id":"","url":"https://api.github.com/users/knockout","html_url":"https://github.com/knockout","followers_url":"https://api.github.com/users/knockout/followers","following_url":"https://api.github.com/users/knockout/following{/other_user}","gists_url":"https://api.github.com/users/knockout/gists{/gist_id}","starred_url":"https://api.github.com/users/knockout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knockout/subscriptions","organizations_url":"https://api.github.com/users/knockout/orgs","repos_url":"https://api.github.com/users/knockout/repos","events_url":"https://api.github.com/users/knockout/events{/privacy}","received_events_url":"https://api.github.com/users/knockout/received_events","type":"Organization","site_admin":false},"repo":{"id":757363,"name":"knockout","full_name":"knockout/knockout","owner":{"login":"knockout","id":3863375,"avatar_url":"https://avatars.githubusercontent.com/u/3863375?v=3","gravatar_id":"","url":"https://api.github.com/users/knockout","html_url":"https://github.com/knockout","followers_url":"https://api.github.com/users/knockout/followers","following_url":"https://api.github.com/users/knockout/following{/other_user}","gists_url":"https://api.github.com/users/knockout/gists{/gist_id}","starred_url":"https://api.github.com/users/knockout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knockout/subscriptions","organizations_url":"https://api.github.com/users/knockout/orgs","repos_url":"https://api.github.com/users/knockout/repos","events_url":"https://api.github.com/users/knockout/events{/privacy}","received_events_url":"https://api.github.com/users/knockout/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/knockout/knockout","description":"Knockout makes it easier to create rich, responsive UIs with JavaScript","fork":false,"url":"https://api.github.com/repos/knockout/knockout","forks_url":"https://api.github.com/repos/knockout/knockout/forks","keys_url":"https://api.github.com/repos/knockout/knockout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knockout/knockout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knockout/knockout/teams","hooks_url":"https://api.github.com/repos/knockout/knockout/hooks","issue_events_url":"https://api.github.com/repos/knockout/knockout/issues/events{/number}","events_url":"https://api.github.com/repos/knockout/knockout/events","assignees_url":"https://api.github.com/repos/knockout/knockout/assignees{/user}","branches_url":"https://api.github.com/repos/knockout/knockout/branches{/branch}","tags_url":"https://api.github.com/repos/knockout/knockout/tags","blobs_url":"https://api.github.com/repos/knockout/knockout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knockout/knockout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knockout/knockout/git/refs{/sha}","trees_url":"https://api.github.com/repos/knockout/knockout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knockout/knockout/statuses/{sha}","languages_url":"https://api.github.com/repos/knockout/knockout/languages","stargazers_url":"https://api.github.com/repos/knockout/knockout/stargazers","contributors_url":"https://api.github.com/repos/knockout/knockout/contributors","subscribers_url":"https://api.github.com/repos/knockout/knockout/subscribers","subscription_url":"https://api.github.com/repos/knockout/knockout/subscription","commits_url":"https://api.github.com/repos/knockout/knockout/commits{/sha}","git_commits_url":"https://api.github.com/repos/knockout/knockout/git/commits{/sha}","comments_url":"https://api.github.com/repos/knockout/knockout/comments{/number}","issue_comment_url":"https://api.github.com/repos/knockout/knockout/issues/comments{/number}","contents_url":"https://api.github.com/repos/knockout/knockout/contents/{+path}","compare_url":"https://api.github.com/repos/knockout/knockout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knockout/knockout/merges","archive_url":"https://api.github.com/repos/knockout/knockout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knockout/knockout/downloads","issues_url":"https://api.github.com/repos/knockout/knockout/issues{/number}","pulls_url":"https://api.github.com/repos/knockout/knockout/pulls{/number}","milestones_url":"https://api.github.com/repos/knockout/knockout/milestones{/number}","notifications_url":"https://api.github.com/repos/knockout/knockout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knockout/knockout/labels{/name}","releases_url":"https://api.github.com/repos/knockout/knockout/releases{/id}","created_at":"2010-07-05T08:08:34Z","updated_at":"2015-06-02T19:08:18Z","pushed_at":"2015-06-02T01:30:01Z","git_url":"git://github.com/knockout/knockout.git","ssh_url":"git@github.com:knockout/knockout.git","clone_url":"https://github.com/knockout/knockout.git","svn_url":"https://github.com/knockout/knockout","homepage":"http://knockoutjs.com/","size":16549,"stargazers_count":6442,"watchers_count":6442,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1105,"mirror_url":null,"open_issues_count":238,"forks":1105,"open_issues":238,"watchers":6442,"default_branch":"master"}},"base":{"label":"knockout:master","ref":"master","sha":"846025a8b092444516d70fd80edd7742a801be38","user":{"login":"knockout","id":3863375,"avatar_url":"https://avatars.githubusercontent.com/u/3863375?v=3","gravatar_id":"","url":"https://api.github.com/users/knockout","html_url":"https://github.com/knockout","followers_url":"https://api.github.com/users/knockout/followers","following_url":"https://api.github.com/users/knockout/following{/other_user}","gists_url":"https://api.github.com/users/knockout/gists{/gist_id}","starred_url":"https://api.github.com/users/knockout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knockout/subscriptions","organizations_url":"https://api.github.com/users/knockout/orgs","repos_url":"https://api.github.com/users/knockout/repos","events_url":"https://api.github.com/users/knockout/events{/privacy}","received_events_url":"https://api.github.com/users/knockout/received_events","type":"Organization","site_admin":false},"repo":{"id":757363,"name":"knockout","full_name":"knockout/knockout","owner":{"login":"knockout","id":3863375,"avatar_url":"https://avatars.githubusercontent.com/u/3863375?v=3","gravatar_id":"","url":"https://api.github.com/users/knockout","html_url":"https://github.com/knockout","followers_url":"https://api.github.com/users/knockout/followers","following_url":"https://api.github.com/users/knockout/following{/other_user}","gists_url":"https://api.github.com/users/knockout/gists{/gist_id}","starred_url":"https://api.github.com/users/knockout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knockout/subscriptions","organizations_url":"https://api.github.com/users/knockout/orgs","repos_url":"https://api.github.com/users/knockout/repos","events_url":"https://api.github.com/users/knockout/events{/privacy}","received_events_url":"https://api.github.com/users/knockout/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/knockout/knockout","description":"Knockout makes it easier to create rich, responsive UIs with JavaScript","fork":false,"url":"https://api.github.com/repos/knockout/knockout","forks_url":"https://api.github.com/repos/knockout/knockout/forks","keys_url":"https://api.github.com/repos/knockout/knockout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/knockout/knockout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/knockout/knockout/teams","hooks_url":"https://api.github.com/repos/knockout/knockout/hooks","issue_events_url":"https://api.github.com/repos/knockout/knockout/issues/events{/number}","events_url":"https://api.github.com/repos/knockout/knockout/events","assignees_url":"https://api.github.com/repos/knockout/knockout/assignees{/user}","branches_url":"https://api.github.com/repos/knockout/knockout/branches{/branch}","tags_url":"https://api.github.com/repos/knockout/knockout/tags","blobs_url":"https://api.github.com/repos/knockout/knockout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/knockout/knockout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/knockout/knockout/git/refs{/sha}","trees_url":"https://api.github.com/repos/knockout/knockout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/knockout/knockout/statuses/{sha}","languages_url":"https://api.github.com/repos/knockout/knockout/languages","stargazers_url":"https://api.github.com/repos/knockout/knockout/stargazers","contributors_url":"https://api.github.com/repos/knockout/knockout/contributors","subscribers_url":"https://api.github.com/repos/knockout/knockout/subscribers","subscription_url":"https://api.github.com/repos/knockout/knockout/subscription","commits_url":"https://api.github.com/repos/knockout/knockout/commits{/sha}","git_commits_url":"https://api.github.com/repos/knockout/knockout/git/commits{/sha}","comments_url":"https://api.github.com/repos/knockout/knockout/comments{/number}","issue_comment_url":"https://api.github.com/repos/knockout/knockout/issues/comments{/number}","contents_url":"https://api.github.com/repos/knockout/knockout/contents/{+path}","compare_url":"https://api.github.com/repos/knockout/knockout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/knockout/knockout/merges","archive_url":"https://api.github.com/repos/knockout/knockout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/knockout/knockout/downloads","issues_url":"https://api.github.com/repos/knockout/knockout/issues{/number}","pulls_url":"https://api.github.com/repos/knockout/knockout/pulls{/number}","milestones_url":"https://api.github.com/repos/knockout/knockout/milestones{/number}","notifications_url":"https://api.github.com/repos/knockout/knockout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/knockout/knockout/labels{/name}","releases_url":"https://api.github.com/repos/knockout/knockout/releases{/id}","created_at":"2010-07-05T08:08:34Z","updated_at":"2015-06-02T19:08:18Z","pushed_at":"2015-06-02T01:30:01Z","git_url":"git://github.com/knockout/knockout.git","ssh_url":"git@github.com:knockout/knockout.git","clone_url":"https://github.com/knockout/knockout.git","svn_url":"https://github.com/knockout/knockout","homepage":"http://knockoutjs.com/","size":16549,"stargazers_count":6442,"watchers_count":6442,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1105,"mirror_url":null,"open_issues_count":238,"forks":1105,"open_issues":238,"watchers":6442,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/knockout/knockout/pulls/1795"},"html":{"href":"https://github.com/knockout/knockout/pull/1795"},"issue":{"href":"https://api.github.com/repos/knockout/knockout/issues/1795"},"comments":{"href":"https://api.github.com/repos/knockout/knockout/issues/1795/comments"},"review_comments":{"href":"https://api.github.com/repos/knockout/knockout/pulls/1795/comments"},"review_comment":{"href":"https://api.github.com/repos/knockout/knockout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/knockout/knockout/pulls/1795/commits"},"statuses":{"href":"https://api.github.com/repos/knockout/knockout/statuses/048179c4d366c4a59238528387f64369057789b6"}}}}