{"action":"created","comment":{"url":"https://api.github.com/repos/petkaantonov/bluebird/pulls/comments/47441611","id":47441611,"diff_hunk":"@@ -276,6 +276,45 @@ function copyDescriptors(from, to, filter) {\n     }\n }\n \n+var _hookIdCounter = 0;\n+// This function should not be used for methods that return a value\n+// Using this function implies small performance overhead, should be used only","path":"src/util.js","position":6,"original_position":6,"commit_id":"dc53ef6adfbf19b82e2ddd5d5d1efdb9fe1040e3","original_commit_id":"dc53ef6adfbf19b82e2ddd5d5d1efdb9fe1040e3","user":{"login":"lextiz","id":1011830,"avatar_url":"https://avatars.githubusercontent.com/u/1011830?v=3","gravatar_id":"","url":"https://api.github.com/users/lextiz","html_url":"https://github.com/lextiz","followers_url":"https://api.github.com/users/lextiz/followers","following_url":"https://api.github.com/users/lextiz/following{/other_user}","gists_url":"https://api.github.com/users/lextiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lextiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lextiz/subscriptions","organizations_url":"https://api.github.com/users/lextiz/orgs","repos_url":"https://api.github.com/users/lextiz/repos","events_url":"https://api.github.com/users/lextiz/events{/privacy}","received_events_url":"https://api.github.com/users/lextiz/received_events","type":"User","site_admin":false},"body":"I assume you are saying this in terms of performance. If so, I will write a short benchmark, comparing \"function wrapping\" method and the current one. If the current method is significantly worse, than I can use \"function wrapping\" and rebuild the hook handler function on each \"unhook\".","created_at":"2015-12-13T08:09:47Z","updated_at":"2015-12-13T08:09:47Z","html_url":"https://github.com/petkaantonov/bluebird/pull/907#discussion_r47441611","pull_request_url":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907","_links":{"self":{"href":"https://api.github.com/repos/petkaantonov/bluebird/pulls/comments/47441611"},"html":{"href":"https://github.com/petkaantonov/bluebird/pull/907#discussion_r47441611"},"pull_request":{"href":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907"}}},"pull_request":{"url":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907","id":53088050,"html_url":"https://github.com/petkaantonov/bluebird/pull/907","diff_url":"https://github.com/petkaantonov/bluebird/pull/907.diff","patch_url":"https://github.com/petkaantonov/bluebird/pull/907.patch","issue_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/907","number":907,"state":"open","locked":false,"title":"Added monitoring functionality for promisses","user":{"login":"lextiz","id":1011830,"avatar_url":"https://avatars.githubusercontent.com/u/1011830?v=3","gravatar_id":"","url":"https://api.github.com/users/lextiz","html_url":"https://github.com/lextiz","followers_url":"https://api.github.com/users/lextiz/followers","following_url":"https://api.github.com/users/lextiz/following{/other_user}","gists_url":"https://api.github.com/users/lextiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lextiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lextiz/subscriptions","organizations_url":"https://api.github.com/users/lextiz/orgs","repos_url":"https://api.github.com/users/lextiz/repos","events_url":"https://api.github.com/users/lextiz/events{/privacy}","received_events_url":"https://api.github.com/users/lextiz/received_events","type":"User","site_admin":false},"body":"This change introduces monitoring for pending promises. Promises are registred at creation and unregistred when their fate is sealed. At any moment library user can see all pending promises by calling Promise.getAllPendingPromises() or just the last promises in all chains by calling Promise.getLeafPendingPromises(). This basic implementation can be extended to show the bigger picture by adding bi-directional connections between promises and building DOT graph of all promises that currently exist.","created_at":"2015-12-09T08:11:17Z","updated_at":"2015-12-13T08:09:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b611c80bd3110ff46434122fd53cad05047e096","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907/commits","review_comments_url":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907/comments","review_comment_url":"https://api.github.com/repos/petkaantonov/bluebird/pulls/comments{/number}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/907/comments","statuses_url":"https://api.github.com/repos/petkaantonov/bluebird/statuses/dc53ef6adfbf19b82e2ddd5d5d1efdb9fe1040e3","head":{"label":"lextiz:monitor","ref":"monitor","sha":"dc53ef6adfbf19b82e2ddd5d5d1efdb9fe1040e3","user":{"login":"lextiz","id":1011830,"avatar_url":"https://avatars.githubusercontent.com/u/1011830?v=3","gravatar_id":"","url":"https://api.github.com/users/lextiz","html_url":"https://github.com/lextiz","followers_url":"https://api.github.com/users/lextiz/followers","following_url":"https://api.github.com/users/lextiz/following{/other_user}","gists_url":"https://api.github.com/users/lextiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lextiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lextiz/subscriptions","organizations_url":"https://api.github.com/users/lextiz/orgs","repos_url":"https://api.github.com/users/lextiz/repos","events_url":"https://api.github.com/users/lextiz/events{/privacy}","received_events_url":"https://api.github.com/users/lextiz/received_events","type":"User","site_admin":false},"repo":{"id":47189758,"name":"bluebird","full_name":"lextiz/bluebird","owner":{"login":"lextiz","id":1011830,"avatar_url":"https://avatars.githubusercontent.com/u/1011830?v=3","gravatar_id":"","url":"https://api.github.com/users/lextiz","html_url":"https://github.com/lextiz","followers_url":"https://api.github.com/users/lextiz/followers","following_url":"https://api.github.com/users/lextiz/following{/other_user}","gists_url":"https://api.github.com/users/lextiz/gists{/gist_id}","starred_url":"https://api.github.com/users/lextiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lextiz/subscriptions","organizations_url":"https://api.github.com/users/lextiz/orgs","repos_url":"https://api.github.com/users/lextiz/repos","events_url":"https://api.github.com/users/lextiz/events{/privacy}","received_events_url":"https://api.github.com/users/lextiz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lextiz/bluebird","description":"Bluebird is a full featured promise library with unmatched performance.","fork":true,"url":"https://api.github.com/repos/lextiz/bluebird","forks_url":"https://api.github.com/repos/lextiz/bluebird/forks","keys_url":"https://api.github.com/repos/lextiz/bluebird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lextiz/bluebird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lextiz/bluebird/teams","hooks_url":"https://api.github.com/repos/lextiz/bluebird/hooks","issue_events_url":"https://api.github.com/repos/lextiz/bluebird/issues/events{/number}","events_url":"https://api.github.com/repos/lextiz/bluebird/events","assignees_url":"https://api.github.com/repos/lextiz/bluebird/assignees{/user}","branches_url":"https://api.github.com/repos/lextiz/bluebird/branches{/branch}","tags_url":"https://api.github.com/repos/lextiz/bluebird/tags","blobs_url":"https://api.github.com/repos/lextiz/bluebird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lextiz/bluebird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lextiz/bluebird/git/refs{/sha}","trees_url":"https://api.github.com/repos/lextiz/bluebird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lextiz/bluebird/statuses/{sha}","languages_url":"https://api.github.com/repos/lextiz/bluebird/languages","stargazers_url":"https://api.github.com/repos/lextiz/bluebird/stargazers","contributors_url":"https://api.github.com/repos/lextiz/bluebird/contributors","subscribers_url":"https://api.github.com/repos/lextiz/bluebird/subscribers","subscription_url":"https://api.github.com/repos/lextiz/bluebird/subscription","commits_url":"https://api.github.com/repos/lextiz/bluebird/commits{/sha}","git_commits_url":"https://api.github.com/repos/lextiz/bluebird/git/commits{/sha}","comments_url":"https://api.github.com/repos/lextiz/bluebird/comments{/number}","issue_comment_url":"https://api.github.com/repos/lextiz/bluebird/issues/comments{/number}","contents_url":"https://api.github.com/repos/lextiz/bluebird/contents/{+path}","compare_url":"https://api.github.com/repos/lextiz/bluebird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lextiz/bluebird/merges","archive_url":"https://api.github.com/repos/lextiz/bluebird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lextiz/bluebird/downloads","issues_url":"https://api.github.com/repos/lextiz/bluebird/issues{/number}","pulls_url":"https://api.github.com/repos/lextiz/bluebird/pulls{/number}","milestones_url":"https://api.github.com/repos/lextiz/bluebird/milestones{/number}","notifications_url":"https://api.github.com/repos/lextiz/bluebird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lextiz/bluebird/labels{/name}","releases_url":"https://api.github.com/repos/lextiz/bluebird/releases{/id}","created_at":"2015-12-01T13:01:35Z","updated_at":"2015-12-01T13:01:38Z","pushed_at":"2015-12-11T20:26:35Z","git_url":"git://github.com/lextiz/bluebird.git","ssh_url":"git@github.com:lextiz/bluebird.git","clone_url":"https://github.com/lextiz/bluebird.git","svn_url":"https://github.com/lextiz/bluebird","homepage":"","size":10569,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"petkaantonov:master","ref":"master","sha":"e5b9025772f490569f51bc0b990b2436c6d83917","user":{"login":"petkaantonov","id":829734,"avatar_url":"https://avatars.githubusercontent.com/u/829734?v=3","gravatar_id":"","url":"https://api.github.com/users/petkaantonov","html_url":"https://github.com/petkaantonov","followers_url":"https://api.github.com/users/petkaantonov/followers","following_url":"https://api.github.com/users/petkaantonov/following{/other_user}","gists_url":"https://api.github.com/users/petkaantonov/gists{/gist_id}","starred_url":"https://api.github.com/users/petkaantonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petkaantonov/subscriptions","organizations_url":"https://api.github.com/users/petkaantonov/orgs","repos_url":"https://api.github.com/users/petkaantonov/repos","events_url":"https://api.github.com/users/petkaantonov/events{/privacy}","received_events_url":"https://api.github.com/users/petkaantonov/received_events","type":"User","site_admin":false},"repo":{"id":12670444,"name":"bluebird","full_name":"petkaantonov/bluebird","owner":{"login":"petkaantonov","id":829734,"avatar_url":"https://avatars.githubusercontent.com/u/829734?v=3","gravatar_id":"","url":"https://api.github.com/users/petkaantonov","html_url":"https://github.com/petkaantonov","followers_url":"https://api.github.com/users/petkaantonov/followers","following_url":"https://api.github.com/users/petkaantonov/following{/other_user}","gists_url":"https://api.github.com/users/petkaantonov/gists{/gist_id}","starred_url":"https://api.github.com/users/petkaantonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petkaantonov/subscriptions","organizations_url":"https://api.github.com/users/petkaantonov/orgs","repos_url":"https://api.github.com/users/petkaantonov/repos","events_url":"https://api.github.com/users/petkaantonov/events{/privacy}","received_events_url":"https://api.github.com/users/petkaantonov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petkaantonov/bluebird","description":"Bluebird is a full featured promise library with unmatched performance.","fork":false,"url":"https://api.github.com/repos/petkaantonov/bluebird","forks_url":"https://api.github.com/repos/petkaantonov/bluebird/forks","keys_url":"https://api.github.com/repos/petkaantonov/bluebird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petkaantonov/bluebird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petkaantonov/bluebird/teams","hooks_url":"https://api.github.com/repos/petkaantonov/bluebird/hooks","issue_events_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/events{/number}","events_url":"https://api.github.com/repos/petkaantonov/bluebird/events","assignees_url":"https://api.github.com/repos/petkaantonov/bluebird/assignees{/user}","branches_url":"https://api.github.com/repos/petkaantonov/bluebird/branches{/branch}","tags_url":"https://api.github.com/repos/petkaantonov/bluebird/tags","blobs_url":"https://api.github.com/repos/petkaantonov/bluebird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petkaantonov/bluebird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petkaantonov/bluebird/git/refs{/sha}","trees_url":"https://api.github.com/repos/petkaantonov/bluebird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petkaantonov/bluebird/statuses/{sha}","languages_url":"https://api.github.com/repos/petkaantonov/bluebird/languages","stargazers_url":"https://api.github.com/repos/petkaantonov/bluebird/stargazers","contributors_url":"https://api.github.com/repos/petkaantonov/bluebird/contributors","subscribers_url":"https://api.github.com/repos/petkaantonov/bluebird/subscribers","subscription_url":"https://api.github.com/repos/petkaantonov/bluebird/subscription","commits_url":"https://api.github.com/repos/petkaantonov/bluebird/commits{/sha}","git_commits_url":"https://api.github.com/repos/petkaantonov/bluebird/git/commits{/sha}","comments_url":"https://api.github.com/repos/petkaantonov/bluebird/comments{/number}","issue_comment_url":"https://api.github.com/repos/petkaantonov/bluebird/issues/comments{/number}","contents_url":"https://api.github.com/repos/petkaantonov/bluebird/contents/{+path}","compare_url":"https://api.github.com/repos/petkaantonov/bluebird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petkaantonov/bluebird/merges","archive_url":"https://api.github.com/repos/petkaantonov/bluebird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petkaantonov/bluebird/downloads","issues_url":"https://api.github.com/repos/petkaantonov/bluebird/issues{/number}","pulls_url":"https://api.github.com/repos/petkaantonov/bluebird/pulls{/number}","milestones_url":"https://api.github.com/repos/petkaantonov/bluebird/milestones{/number}","notifications_url":"https://api.github.com/repos/petkaantonov/bluebird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petkaantonov/bluebird/labels{/name}","releases_url":"https://api.github.com/repos/petkaantonov/bluebird/releases{/id}","created_at":"2013-09-07T19:39:57Z","updated_at":"2015-12-13T07:03:26Z","pushed_at":"2015-12-12T23:47:47Z","git_url":"git://github.com/petkaantonov/bluebird.git","ssh_url":"git@github.com:petkaantonov/bluebird.git","clone_url":"https://github.com/petkaantonov/bluebird.git","svn_url":"https://github.com/petkaantonov/bluebird","homepage":"","size":11328,"stargazers_count":9173,"watchers_count":9173,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1063,"mirror_url":null,"open_issues_count":22,"forks":1063,"open_issues":22,"watchers":9173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907"},"html":{"href":"https://github.com/petkaantonov/bluebird/pull/907"},"issue":{"href":"https://api.github.com/repos/petkaantonov/bluebird/issues/907"},"comments":{"href":"https://api.github.com/repos/petkaantonov/bluebird/issues/907/comments"},"review_comments":{"href":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907/comments"},"review_comment":{"href":"https://api.github.com/repos/petkaantonov/bluebird/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/petkaantonov/bluebird/pulls/907/commits"},"statuses":{"href":"https://api.github.com/repos/petkaantonov/bluebird/statuses/dc53ef6adfbf19b82e2ddd5d5d1efdb9fe1040e3"}}}}