{"action":"created","comment":{"url":"https://api.github.com/repos/netty/netty/pulls/comments/43158027","id":43158027,"diff_hunk":"@@ -153,7 +150,10 @@ public ChannelHandlerContext fireUserEventTriggered(Object event) {\n     @Override\n     public ChannelHandlerContext fireChannelRead(Object msg) {\n         AbstractChannelHandlerContext next = findContextInbound();\n-        ReferenceCountUtil.touch(msg, next);\n+        if (ResourceLeakDetector.ENABLED) {","path":"transport/src/main/java/io/netty/channel/AbstractChannelHandlerContext.java","position":17,"original_position":17,"commit_id":"1525e6efdd9af2981196fc92628688d55411765b","original_commit_id":"a2f826546d9dff7e61f72835200d9e69ab3924a1","user":{"login":"ninja-","id":5637961,"avatar_url":"https://avatars.githubusercontent.com/u/5637961?v=3","gravatar_id":"","url":"https://api.github.com/users/ninja-","html_url":"https://github.com/ninja-","followers_url":"https://api.github.com/users/ninja-/followers","following_url":"https://api.github.com/users/ninja-/following{/other_user}","gists_url":"https://api.github.com/users/ninja-/gists{/gist_id}","starred_url":"https://api.github.com/users/ninja-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninja-/subscriptions","organizations_url":"https://api.github.com/users/ninja-/orgs","repos_url":"https://api.github.com/users/ninja-/repos","events_url":"https://api.github.com/users/ninja-/events{/privacy}","received_events_url":"https://api.github.com/users/ninja-/received_events","type":"User","site_admin":false},"body":"@Scottmitch is epoll wait considered to use cpu or it's more like thread.sleep?\r\nwell I could just consider touching anything other than read/write syscalls a waste of time by looking at profiler \r\n\r\n[a](https://sc-cdn.scaleengine.net/i/a411ab99d85b37d5ff21c2b1f28e566c1.png)\r\n\r\nbut getting .touch() out is free so that's what I did","created_at":"2015-10-27T17:42:51Z","updated_at":"2015-10-27T17:42:51Z","html_url":"https://github.com/netty/netty/pull/4390#discussion_r43158027","pull_request_url":"https://api.github.com/repos/netty/netty/pulls/4390","_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/comments/43158027"},"html":{"href":"https://github.com/netty/netty/pull/4390#discussion_r43158027"},"pull_request":{"href":"https://api.github.com/repos/netty/netty/pulls/4390"}}},"pull_request":{"url":"https://api.github.com/repos/netty/netty/pulls/4390","id":48660515,"html_url":"https://github.com/netty/netty/pull/4390","diff_url":"https://github.com/netty/netty/pull/4390.diff","patch_url":"https://github.com/netty/netty/pull/4390.patch","issue_url":"https://api.github.com/repos/netty/netty/issues/4390","number":4390,"state":"open","locked":false,"title":"Small perf improvements around read/write channel calls.","user":{"login":"ninja-","id":5637961,"avatar_url":"https://avatars.githubusercontent.com/u/5637961?v=3","gravatar_id":"","url":"https://api.github.com/users/ninja-","html_url":"https://github.com/ninja-","followers_url":"https://api.github.com/users/ninja-/followers","following_url":"https://api.github.com/users/ninja-/following{/other_user}","gists_url":"https://api.github.com/users/ninja-/gists{/gist_id}","starred_url":"https://api.github.com/users/ninja-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninja-/subscriptions","organizations_url":"https://api.github.com/users/ninja-/orgs","repos_url":"https://api.github.com/users/ninja-/repos","events_url":"https://api.github.com/users/ninja-/events{/privacy}","received_events_url":"https://api.github.com/users/ninja-/received_events","type":"User","site_admin":false},"body":"Motivation:\r\n\r\nReferenceCountUtil.touch is listed as hot spot when profiling, probably because of the \"instanceof\" call.\r\n\r\nModifications:\r\n\r\nUse an inlined condition to check if leak detector is enabled before calling .touch\r\n\r\nResult:\r\n\r\nSmall perf improvements around read/write channel calls, getting .touch out of the hot spots.","created_at":"2015-10-24T17:13:46Z","updated_at":"2015-10-27T17:42:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ad53b75ab9231fa8ccd8ae109481bc027b78f52","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/netty/netty/pulls/4390/commits","review_comments_url":"https://api.github.com/repos/netty/netty/pulls/4390/comments","review_comment_url":"https://api.github.com/repos/netty/netty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/netty/netty/issues/4390/comments","statuses_url":"https://api.github.com/repos/netty/netty/statuses/1525e6efdd9af2981196fc92628688d55411765b","head":{"label":"ninja-:cant_touch_this","ref":"cant_touch_this","sha":"1525e6efdd9af2981196fc92628688d55411765b","user":{"login":"ninja-","id":5637961,"avatar_url":"https://avatars.githubusercontent.com/u/5637961?v=3","gravatar_id":"","url":"https://api.github.com/users/ninja-","html_url":"https://github.com/ninja-","followers_url":"https://api.github.com/users/ninja-/followers","following_url":"https://api.github.com/users/ninja-/following{/other_user}","gists_url":"https://api.github.com/users/ninja-/gists{/gist_id}","starred_url":"https://api.github.com/users/ninja-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninja-/subscriptions","organizations_url":"https://api.github.com/users/ninja-/orgs","repos_url":"https://api.github.com/users/ninja-/repos","events_url":"https://api.github.com/users/ninja-/events{/privacy}","received_events_url":"https://api.github.com/users/ninja-/received_events","type":"User","site_admin":false},"repo":{"id":43228104,"name":"netty","full_name":"ninja-/netty","owner":{"login":"ninja-","id":5637961,"avatar_url":"https://avatars.githubusercontent.com/u/5637961?v=3","gravatar_id":"","url":"https://api.github.com/users/ninja-","html_url":"https://github.com/ninja-","followers_url":"https://api.github.com/users/ninja-/followers","following_url":"https://api.github.com/users/ninja-/following{/other_user}","gists_url":"https://api.github.com/users/ninja-/gists{/gist_id}","starred_url":"https://api.github.com/users/ninja-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninja-/subscriptions","organizations_url":"https://api.github.com/users/ninja-/orgs","repos_url":"https://api.github.com/users/ninja-/repos","events_url":"https://api.github.com/users/ninja-/events{/privacy}","received_events_url":"https://api.github.com/users/ninja-/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninja-/netty","description":"I like pushing netty to it's limits. ninja contributions to","fork":true,"url":"https://api.github.com/repos/ninja-/netty","forks_url":"https://api.github.com/repos/ninja-/netty/forks","keys_url":"https://api.github.com/repos/ninja-/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninja-/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninja-/netty/teams","hooks_url":"https://api.github.com/repos/ninja-/netty/hooks","issue_events_url":"https://api.github.com/repos/ninja-/netty/issues/events{/number}","events_url":"https://api.github.com/repos/ninja-/netty/events","assignees_url":"https://api.github.com/repos/ninja-/netty/assignees{/user}","branches_url":"https://api.github.com/repos/ninja-/netty/branches{/branch}","tags_url":"https://api.github.com/repos/ninja-/netty/tags","blobs_url":"https://api.github.com/repos/ninja-/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninja-/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninja-/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninja-/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninja-/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/ninja-/netty/languages","stargazers_url":"https://api.github.com/repos/ninja-/netty/stargazers","contributors_url":"https://api.github.com/repos/ninja-/netty/contributors","subscribers_url":"https://api.github.com/repos/ninja-/netty/subscribers","subscription_url":"https://api.github.com/repos/ninja-/netty/subscription","commits_url":"https://api.github.com/repos/ninja-/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninja-/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninja-/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninja-/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninja-/netty/contents/{+path}","compare_url":"https://api.github.com/repos/ninja-/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninja-/netty/merges","archive_url":"https://api.github.com/repos/ninja-/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninja-/netty/downloads","issues_url":"https://api.github.com/repos/ninja-/netty/issues{/number}","pulls_url":"https://api.github.com/repos/ninja-/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/ninja-/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/ninja-/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninja-/netty/labels{/name}","releases_url":"https://api.github.com/repos/ninja-/netty/releases{/id}","created_at":"2015-09-27T00:19:12Z","updated_at":"2015-09-29T22:44:50Z","pushed_at":"2015-10-27T16:02:40Z","git_url":"git://github.com/ninja-/netty.git","ssh_url":"git@github.com:ninja-/netty.git","clone_url":"https://github.com/ninja-/netty.git","svn_url":"https://github.com/ninja-/netty","homepage":"http://netty.io/","size":45616,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"netty:4.1","ref":"4.1","sha":"8687475eb77e794ed56e8285aa0dc982d93a1048","user":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"repo":{"id":1064563,"name":"netty","full_name":"netty/netty","owner":{"login":"netty","id":473791,"avatar_url":"https://avatars.githubusercontent.com/u/473791?v=3","gravatar_id":"","url":"https://api.github.com/users/netty","html_url":"https://github.com/netty","followers_url":"https://api.github.com/users/netty/followers","following_url":"https://api.github.com/users/netty/following{/other_user}","gists_url":"https://api.github.com/users/netty/gists{/gist_id}","starred_url":"https://api.github.com/users/netty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netty/subscriptions","organizations_url":"https://api.github.com/users/netty/orgs","repos_url":"https://api.github.com/users/netty/repos","events_url":"https://api.github.com/users/netty/events{/privacy}","received_events_url":"https://api.github.com/users/netty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/netty/netty","description":"Netty project - an event-driven asynchronous network application framework","fork":false,"url":"https://api.github.com/repos/netty/netty","forks_url":"https://api.github.com/repos/netty/netty/forks","keys_url":"https://api.github.com/repos/netty/netty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/netty/netty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/netty/netty/teams","hooks_url":"https://api.github.com/repos/netty/netty/hooks","issue_events_url":"https://api.github.com/repos/netty/netty/issues/events{/number}","events_url":"https://api.github.com/repos/netty/netty/events","assignees_url":"https://api.github.com/repos/netty/netty/assignees{/user}","branches_url":"https://api.github.com/repos/netty/netty/branches{/branch}","tags_url":"https://api.github.com/repos/netty/netty/tags","blobs_url":"https://api.github.com/repos/netty/netty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/netty/netty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/netty/netty/git/refs{/sha}","trees_url":"https://api.github.com/repos/netty/netty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/netty/netty/statuses/{sha}","languages_url":"https://api.github.com/repos/netty/netty/languages","stargazers_url":"https://api.github.com/repos/netty/netty/stargazers","contributors_url":"https://api.github.com/repos/netty/netty/contributors","subscribers_url":"https://api.github.com/repos/netty/netty/subscribers","subscription_url":"https://api.github.com/repos/netty/netty/subscription","commits_url":"https://api.github.com/repos/netty/netty/commits{/sha}","git_commits_url":"https://api.github.com/repos/netty/netty/git/commits{/sha}","comments_url":"https://api.github.com/repos/netty/netty/comments{/number}","issue_comment_url":"https://api.github.com/repos/netty/netty/issues/comments{/number}","contents_url":"https://api.github.com/repos/netty/netty/contents/{+path}","compare_url":"https://api.github.com/repos/netty/netty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/netty/netty/merges","archive_url":"https://api.github.com/repos/netty/netty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/netty/netty/downloads","issues_url":"https://api.github.com/repos/netty/netty/issues{/number}","pulls_url":"https://api.github.com/repos/netty/netty/pulls{/number}","milestones_url":"https://api.github.com/repos/netty/netty/milestones{/number}","notifications_url":"https://api.github.com/repos/netty/netty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/netty/netty/labels{/name}","releases_url":"https://api.github.com/repos/netty/netty/releases{/id}","created_at":"2010-11-09T09:22:21Z","updated_at":"2015-10-27T13:18:42Z","pushed_at":"2015-10-27T16:02:47Z","git_url":"git://github.com/netty/netty.git","ssh_url":"git@github.com:netty/netty.git","clone_url":"https://github.com/netty/netty.git","svn_url":"https://github.com/netty/netty","homepage":"http://netty.io/","size":135980,"stargazers_count":5468,"watchers_count":5468,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2776,"mirror_url":null,"open_issues_count":320,"forks":2776,"open_issues":320,"watchers":5468,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/netty/netty/pulls/4390"},"html":{"href":"https://github.com/netty/netty/pull/4390"},"issue":{"href":"https://api.github.com/repos/netty/netty/issues/4390"},"comments":{"href":"https://api.github.com/repos/netty/netty/issues/4390/comments"},"review_comments":{"href":"https://api.github.com/repos/netty/netty/pulls/4390/comments"},"review_comment":{"href":"https://api.github.com/repos/netty/netty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/netty/netty/pulls/4390/commits"},"statuses":{"href":"https://api.github.com/repos/netty/netty/statuses/1525e6efdd9af2981196fc92628688d55411765b"}}}}