{"action":"created","comment":{"url":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments/233496010","pull_request_review_id":174922042,"id":233496010,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzQ5NjAxMA==","diff_hunk":"@@ -564,34 +604,59 @@ public CoreMessage setUserID(UUID userID) {\n    /**\n     * I am keeping this synchronized as the decode of the Properties is lazy\n     */\n-   protected TypedProperties checkProperties() {\n+   protected final TypedProperties checkProperties() {\n       try {\n+         TypedProperties properties = this.properties;\n          if (properties == null) {\n-            synchronized (this) {\n-               if (properties == null) {\n-                  TypedProperties properties = new TypedProperties();\n-                  if (buffer != null && propertiesLocation >= 0) {\n-                     final ByteBuf byteBuf = buffer.duplicate().readerIndex(propertiesLocation);\n-                     properties.decode(byteBuf, coreMessageObjectPools == null ? null : coreMessageObjectPools.getPropertiesDecoderPools());\n-                  }\n-                  this.properties = properties;\n-               }\n+            properties = getOrInitializeTypedProperties();\n+         }\n+         return properties;\n+      } catch (Throwable e) {\n+         throw onCheckPropertiesError(e);\n+      }\n+   }\n+\n+   private TypedProperties getOrInitializeTypedProperties() {\n+      synchronized (this) {","path":"artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java","position":188,"original_position":188,"commit_id":"8ff2a442ef398c641001102849451081180b87ad","original_commit_id":"8ff2a442ef398c641001102849451081180b87ad","user":{"login":"michaelandrepearce","id":1387822,"node_id":"MDQ6VXNlcjEzODc4MjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1387822?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelandrepearce","html_url":"https://github.com/michaelandrepearce","followers_url":"https://api.github.com/users/michaelandrepearce/followers","following_url":"https://api.github.com/users/michaelandrepearce/following{/other_user}","gists_url":"https://api.github.com/users/michaelandrepearce/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelandrepearce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelandrepearce/subscriptions","organizations_url":"https://api.github.com/users/michaelandrepearce/orgs","repos_url":"https://api.github.com/users/michaelandrepearce/repos","events_url":"https://api.github.com/users/michaelandrepearce/events{/privacy}","received_events_url":"https://api.github.com/users/michaelandrepearce/received_events","type":"User","site_admin":false},"body":"if youre separating this to its own method, which is nice +1, theres an extra trick which is to change from sync block to sync method, which will be marginally faster.","created_at":"2018-11-14T15:33:30Z","updated_at":"2018-11-14T15:33:30Z","html_url":"https://github.com/apache/activemq-artemis/pull/2427#discussion_r233496010","pull_request_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments/233496010"},"html":{"href":"https://github.com/apache/activemq-artemis/pull/2427#discussion_r233496010"},"pull_request":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427"}}},"pull_request":{"url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427","id":229945121,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5OTQ1MTIx","html_url":"https://github.com/apache/activemq-artemis/pull/2427","diff_url":"https://github.com/apache/activemq-artemis/pull/2427.diff","patch_url":"https://github.com/apache/activemq-artemis/pull/2427.patch","issue_url":"https://api.github.com/repos/apache/activemq-artemis/issues/2427","number":2427,"state":"open","locked":false,"title":"ARTEMIS-2170 Optimized CoreMessage's checkProperties and cleanupInternalProperties methods","user":{"login":"franz1981","id":13125299,"node_id":"MDQ6VXNlcjEzMTI1Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/13125299?v=4","gravatar_id":"","url":"https://api.github.com/users/franz1981","html_url":"https://github.com/franz1981","followers_url":"https://api.github.com/users/franz1981/followers","following_url":"https://api.github.com/users/franz1981/following{/other_user}","gists_url":"https://api.github.com/users/franz1981/gists{/gist_id}","starred_url":"https://api.github.com/users/franz1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz1981/subscriptions","organizations_url":"https://api.github.com/users/franz1981/orgs","repos_url":"https://api.github.com/users/franz1981/repos","events_url":"https://api.github.com/users/franz1981/events{/privacy}","received_events_url":"https://api.github.com/users/franz1981/received_events","type":"User","site_admin":false},"body":"It includes 2 optimizations related to CoreMessage hot paths operations: checkProperties and cleanupInternalProperties.\r\n","created_at":"2018-11-11T11:08:13Z","updated_at":"2018-11-14T15:33:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"728c09c5301411e4e3365f71846398d35a591362","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427/commits","review_comments_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427/comments","review_comment_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/activemq-artemis/issues/2427/comments","statuses_url":"https://api.github.com/repos/apache/activemq-artemis/statuses/8ff2a442ef398c641001102849451081180b87ad","head":{"label":"franz1981:ARTEMIS-2170","ref":"ARTEMIS-2170","sha":"8ff2a442ef398c641001102849451081180b87ad","user":{"login":"franz1981","id":13125299,"node_id":"MDQ6VXNlcjEzMTI1Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/13125299?v=4","gravatar_id":"","url":"https://api.github.com/users/franz1981","html_url":"https://github.com/franz1981","followers_url":"https://api.github.com/users/franz1981/followers","following_url":"https://api.github.com/users/franz1981/following{/other_user}","gists_url":"https://api.github.com/users/franz1981/gists{/gist_id}","starred_url":"https://api.github.com/users/franz1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz1981/subscriptions","organizations_url":"https://api.github.com/users/franz1981/orgs","repos_url":"https://api.github.com/users/franz1981/repos","events_url":"https://api.github.com/users/franz1981/events{/privacy}","received_events_url":"https://api.github.com/users/franz1981/received_events","type":"User","site_admin":false},"repo":{"id":57105719,"node_id":"MDEwOlJlcG9zaXRvcnk1NzEwNTcxOQ==","name":"activemq-artemis","full_name":"franz1981/activemq-artemis","private":false,"owner":{"login":"franz1981","id":13125299,"node_id":"MDQ6VXNlcjEzMTI1Mjk5","avatar_url":"https://avatars2.githubusercontent.com/u/13125299?v=4","gravatar_id":"","url":"https://api.github.com/users/franz1981","html_url":"https://github.com/franz1981","followers_url":"https://api.github.com/users/franz1981/followers","following_url":"https://api.github.com/users/franz1981/following{/other_user}","gists_url":"https://api.github.com/users/franz1981/gists{/gist_id}","starred_url":"https://api.github.com/users/franz1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franz1981/subscriptions","organizations_url":"https://api.github.com/users/franz1981/orgs","repos_url":"https://api.github.com/users/franz1981/repos","events_url":"https://api.github.com/users/franz1981/events{/privacy}","received_events_url":"https://api.github.com/users/franz1981/received_events","type":"User","site_admin":false},"html_url":"https://github.com/franz1981/activemq-artemis","description":"Mirror of Apache ActiveMQ Artemis","fork":true,"url":"https://api.github.com/repos/franz1981/activemq-artemis","forks_url":"https://api.github.com/repos/franz1981/activemq-artemis/forks","keys_url":"https://api.github.com/repos/franz1981/activemq-artemis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/franz1981/activemq-artemis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/franz1981/activemq-artemis/teams","hooks_url":"https://api.github.com/repos/franz1981/activemq-artemis/hooks","issue_events_url":"https://api.github.com/repos/franz1981/activemq-artemis/issues/events{/number}","events_url":"https://api.github.com/repos/franz1981/activemq-artemis/events","assignees_url":"https://api.github.com/repos/franz1981/activemq-artemis/assignees{/user}","branches_url":"https://api.github.com/repos/franz1981/activemq-artemis/branches{/branch}","tags_url":"https://api.github.com/repos/franz1981/activemq-artemis/tags","blobs_url":"https://api.github.com/repos/franz1981/activemq-artemis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/franz1981/activemq-artemis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/franz1981/activemq-artemis/git/refs{/sha}","trees_url":"https://api.github.com/repos/franz1981/activemq-artemis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/franz1981/activemq-artemis/statuses/{sha}","languages_url":"https://api.github.com/repos/franz1981/activemq-artemis/languages","stargazers_url":"https://api.github.com/repos/franz1981/activemq-artemis/stargazers","contributors_url":"https://api.github.com/repos/franz1981/activemq-artemis/contributors","subscribers_url":"https://api.github.com/repos/franz1981/activemq-artemis/subscribers","subscription_url":"https://api.github.com/repos/franz1981/activemq-artemis/subscription","commits_url":"https://api.github.com/repos/franz1981/activemq-artemis/commits{/sha}","git_commits_url":"https://api.github.com/repos/franz1981/activemq-artemis/git/commits{/sha}","comments_url":"https://api.github.com/repos/franz1981/activemq-artemis/comments{/number}","issue_comment_url":"https://api.github.com/repos/franz1981/activemq-artemis/issues/comments{/number}","contents_url":"https://api.github.com/repos/franz1981/activemq-artemis/contents/{+path}","compare_url":"https://api.github.com/repos/franz1981/activemq-artemis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/franz1981/activemq-artemis/merges","archive_url":"https://api.github.com/repos/franz1981/activemq-artemis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/franz1981/activemq-artemis/downloads","issues_url":"https://api.github.com/repos/franz1981/activemq-artemis/issues{/number}","pulls_url":"https://api.github.com/repos/franz1981/activemq-artemis/pulls{/number}","milestones_url":"https://api.github.com/repos/franz1981/activemq-artemis/milestones{/number}","notifications_url":"https://api.github.com/repos/franz1981/activemq-artemis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/franz1981/activemq-artemis/labels{/name}","releases_url":"https://api.github.com/repos/franz1981/activemq-artemis/releases{/id}","deployments_url":"https://api.github.com/repos/franz1981/activemq-artemis/deployments","created_at":"2016-04-26T07:03:57Z","updated_at":"2016-04-26T07:04:06Z","pushed_at":"2018-11-13T20:10:40Z","git_url":"git://github.com/franz1981/activemq-artemis.git","ssh_url":"git@github.com:franz1981/activemq-artemis.git","clone_url":"https://github.com/franz1981/activemq-artemis.git","svn_url":"https://github.com/franz1981/activemq-artemis","homepage":"","size":59869,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"366005e44f9e27d2f79ceedaf27b8bdd63215359","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":36057260,"node_id":"MDEwOlJlcG9zaXRvcnkzNjA1NzI2MA==","name":"activemq-artemis","full_name":"apache/activemq-artemis","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/activemq-artemis","description":"Mirror of Apache ActiveMQ Artemis","fork":false,"url":"https://api.github.com/repos/apache/activemq-artemis","forks_url":"https://api.github.com/repos/apache/activemq-artemis/forks","keys_url":"https://api.github.com/repos/apache/activemq-artemis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/activemq-artemis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/activemq-artemis/teams","hooks_url":"https://api.github.com/repos/apache/activemq-artemis/hooks","issue_events_url":"https://api.github.com/repos/apache/activemq-artemis/issues/events{/number}","events_url":"https://api.github.com/repos/apache/activemq-artemis/events","assignees_url":"https://api.github.com/repos/apache/activemq-artemis/assignees{/user}","branches_url":"https://api.github.com/repos/apache/activemq-artemis/branches{/branch}","tags_url":"https://api.github.com/repos/apache/activemq-artemis/tags","blobs_url":"https://api.github.com/repos/apache/activemq-artemis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/activemq-artemis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/activemq-artemis/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/activemq-artemis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/activemq-artemis/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/activemq-artemis/languages","stargazers_url":"https://api.github.com/repos/apache/activemq-artemis/stargazers","contributors_url":"https://api.github.com/repos/apache/activemq-artemis/contributors","subscribers_url":"https://api.github.com/repos/apache/activemq-artemis/subscribers","subscription_url":"https://api.github.com/repos/apache/activemq-artemis/subscription","commits_url":"https://api.github.com/repos/apache/activemq-artemis/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/activemq-artemis/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/activemq-artemis/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/activemq-artemis/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/activemq-artemis/contents/{+path}","compare_url":"https://api.github.com/repos/apache/activemq-artemis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/activemq-artemis/merges","archive_url":"https://api.github.com/repos/apache/activemq-artemis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/activemq-artemis/downloads","issues_url":"https://api.github.com/repos/apache/activemq-artemis/issues{/number}","pulls_url":"https://api.github.com/repos/apache/activemq-artemis/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/activemq-artemis/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/activemq-artemis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/activemq-artemis/labels{/name}","releases_url":"https://api.github.com/repos/apache/activemq-artemis/releases{/id}","deployments_url":"https://api.github.com/repos/apache/activemq-artemis/deployments","created_at":"2015-05-22T07:00:05Z","updated_at":"2018-11-14T15:24:21Z","pushed_at":"2018-11-14T15:24:13Z","git_url":"git://github.com/apache/activemq-artemis.git","ssh_url":"git@github.com:apache/activemq-artemis.git","clone_url":"https://github.com/apache/activemq-artemis.git","svn_url":"https://github.com/apache/activemq-artemis","homepage":"","size":56058,"stargazers_count":364,"watchers_count":364,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":390,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":390,"open_issues":33,"watchers":364,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427"},"html":{"href":"https://github.com/apache/activemq-artemis/pull/2427"},"issue":{"href":"https://api.github.com/repos/apache/activemq-artemis/issues/2427"},"comments":{"href":"https://api.github.com/repos/apache/activemq-artemis/issues/2427/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2427/commits"},"statuses":{"href":"https://api.github.com/repos/apache/activemq-artemis/statuses/8ff2a442ef398c641001102849451081180b87ad"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"michaelandrepearce"}}