{"action":"created","comment":{"url":"https://api.github.com/repos/apache/geode/pulls/comments/270611222","pull_request_review_id":220805427,"id":270611222,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3MDYxMTIyMg==","diff_hunk":"@@ -2728,14 +2729,69 @@ private static String readStringUTFFromDataInput(DataInput in) throws IOExceptio\n     return in.readUTF();\n   }\n \n+  /**\n+   * If not null then this field can be used to\n+   * directly set the char[] \"value\" field on a String instance.\n+   */\n+  static final Field stringValueField;\n+  static {\n+    Field tempField;\n+    try {\n+      tempField = String.class.getDeclaredField(\"value\");\n+      tempField.setAccessible(true);\n+      String test = new String();\n+      char[] charArray = new char[2];\n+      tempField.set(test, charArray);\n+    } catch (NoSuchFieldException | SecurityException | IllegalArgumentException\n+        | IllegalAccessException e) {\n+      logger.info(\"Could not optimize string deserialization\", e);\n+      tempField = null;\n+    }\n+    stringValueField = tempField;\n+  }\n+\n+  /**\n+   * Attempts to create a string without any extra copies of the\n+   * characters.\n+   * Returns null if this optimization is not supported.\n+   * Otherwise it returns the String created.\n+   *\n+   * @param dataInput stream of input bytes\n+   * @param len of the string to create\n+   * @return the created string or null if it could not be created\n+   * @throws IOException if dataInput fails\n+   */\n+  private static String tryNoCopyStringCreation(DataInput dataInput, int len) throws IOException {\n+    if (stringValueField == null) {\n+      return null;\n+    }\n+    char[] charArray = new char[len];\n+    for (int i = 0; i < len; i++) {\n+      charArray[i] = (char) dataInput.readByte();","path":"geode-core/src/main/java/org/apache/geode/internal/InternalDataSerializer.java","position":50,"original_position":50,"commit_id":"6298f38cb69de2ef199349a217c4a619754df0fc","original_commit_id":"6298f38cb69de2ef199349a217c4a619754df0fc","user":{"login":"pivotal-jbarrett","id":6800791,"node_id":"MDQ6VXNlcjY4MDA3OTE=","avatar_url":"https://avatars2.githubusercontent.com/u/6800791?v=4","gravatar_id":"","url":"https://api.github.com/users/pivotal-jbarrett","html_url":"https://github.com/pivotal-jbarrett","followers_url":"https://api.github.com/users/pivotal-jbarrett/followers","following_url":"https://api.github.com/users/pivotal-jbarrett/following{/other_user}","gists_url":"https://api.github.com/users/pivotal-jbarrett/gists{/gist_id}","starred_url":"https://api.github.com/users/pivotal-jbarrett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivotal-jbarrett/subscriptions","organizations_url":"https://api.github.com/users/pivotal-jbarrett/orgs","repos_url":"https://api.github.com/users/pivotal-jbarrett/repos","events_url":"https://api.github.com/users/pivotal-jbarrett/events{/privacy}","received_events_url":"https://api.github.com/users/pivotal-jbarrett/received_events","type":"User","site_admin":false},"body":"Is there not a faster way to read several bytes at a time. The `readByte` is going to incur the bounds checking for each call.","created_at":"2019-03-30T03:15:50Z","updated_at":"2019-03-30T03:20:51Z","html_url":"https://github.com/apache/geode/pull/3381#discussion_r270611222","pull_request_url":"https://api.github.com/repos/apache/geode/pulls/3381","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/geode/pulls/comments/270611222"},"html":{"href":"https://github.com/apache/geode/pull/3381#discussion_r270611222"},"pull_request":{"href":"https://api.github.com/repos/apache/geode/pulls/3381"}}},"pull_request":{"url":"https://api.github.com/repos/apache/geode/pulls/3381","id":265903307,"node_id":"MDExOlB1bGxSZXF1ZXN0MjY1OTAzMzA3","html_url":"https://github.com/apache/geode/pull/3381","diff_url":"https://github.com/apache/geode/pull/3381.diff","patch_url":"https://github.com/apache/geode/pull/3381.patch","issue_url":"https://api.github.com/repos/apache/geode/issues/3381","number":3381,"state":"open","locked":false,"title":"GEODE-6579: optimize string deserialization","user":{"login":"dschneider-pivotal","id":11197400,"node_id":"MDQ6VXNlcjExMTk3NDAw","avatar_url":"https://avatars0.githubusercontent.com/u/11197400?v=4","gravatar_id":"","url":"https://api.github.com/users/dschneider-pivotal","html_url":"https://github.com/dschneider-pivotal","followers_url":"https://api.github.com/users/dschneider-pivotal/followers","following_url":"https://api.github.com/users/dschneider-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/dschneider-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/dschneider-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschneider-pivotal/subscriptions","organizations_url":"https://api.github.com/users/dschneider-pivotal/orgs","repos_url":"https://api.github.com/users/dschneider-pivotal/repos","events_url":"https://api.github.com/users/dschneider-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/dschneider-pivotal/received_events","type":"User","site_admin":false},"body":"Added an implementation of readString that creates a string from the DataInput\r\nwithout any extra copies.\r\n\r\nThank you for submitting a contribution to Apache Geode.\r\n\r\nIn order to streamline the review of the contribution we ask you\r\nto ensure the following steps have been taken:\r\n\r\n### For all changes:\r\n- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?\r\n\r\n- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?\r\n\r\n- [ ] Is your initial contribution a single, squashed commit?\r\n\r\n- [ ] Does `gradlew build` run cleanly?\r\n\r\n- [ ] Have you written or updated unit tests to verify your changes?\r\n\r\n- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?\r\n\r\n### Note:\r\nPlease ensure that once the PR is submitted, check Concourse for build issues and\r\nsubmit an update to your PR as soon as possible. If you need help, please send an\r\nemail to dev@geode.apache.org.\r\n","created_at":"2019-03-30T01:14:31Z","updated_at":"2019-03-30T03:20:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"baad0634c079adae21efad3c2432caaa1df51ac3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/geode/pulls/3381/commits","review_comments_url":"https://api.github.com/repos/apache/geode/pulls/3381/comments","review_comment_url":"https://api.github.com/repos/apache/geode/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/geode/issues/3381/comments","statuses_url":"https://api.github.com/repos/apache/geode/statuses/6298f38cb69de2ef199349a217c4a619754df0fc","head":{"label":"dschneider-pivotal:feature/GEODE-6579","ref":"feature/GEODE-6579","sha":"6298f38cb69de2ef199349a217c4a619754df0fc","user":{"login":"dschneider-pivotal","id":11197400,"node_id":"MDQ6VXNlcjExMTk3NDAw","avatar_url":"https://avatars0.githubusercontent.com/u/11197400?v=4","gravatar_id":"","url":"https://api.github.com/users/dschneider-pivotal","html_url":"https://github.com/dschneider-pivotal","followers_url":"https://api.github.com/users/dschneider-pivotal/followers","following_url":"https://api.github.com/users/dschneider-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/dschneider-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/dschneider-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschneider-pivotal/subscriptions","organizations_url":"https://api.github.com/users/dschneider-pivotal/orgs","repos_url":"https://api.github.com/users/dschneider-pivotal/repos","events_url":"https://api.github.com/users/dschneider-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/dschneider-pivotal/received_events","type":"User","site_admin":false},"repo":{"id":102797819,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI3OTc4MTk=","name":"geode","full_name":"dschneider-pivotal/geode","private":false,"owner":{"login":"dschneider-pivotal","id":11197400,"node_id":"MDQ6VXNlcjExMTk3NDAw","avatar_url":"https://avatars0.githubusercontent.com/u/11197400?v=4","gravatar_id":"","url":"https://api.github.com/users/dschneider-pivotal","html_url":"https://github.com/dschneider-pivotal","followers_url":"https://api.github.com/users/dschneider-pivotal/followers","following_url":"https://api.github.com/users/dschneider-pivotal/following{/other_user}","gists_url":"https://api.github.com/users/dschneider-pivotal/gists{/gist_id}","starred_url":"https://api.github.com/users/dschneider-pivotal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschneider-pivotal/subscriptions","organizations_url":"https://api.github.com/users/dschneider-pivotal/orgs","repos_url":"https://api.github.com/users/dschneider-pivotal/repos","events_url":"https://api.github.com/users/dschneider-pivotal/events{/privacy}","received_events_url":"https://api.github.com/users/dschneider-pivotal/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dschneider-pivotal/geode","description":"Apache Geode","fork":true,"url":"https://api.github.com/repos/dschneider-pivotal/geode","forks_url":"https://api.github.com/repos/dschneider-pivotal/geode/forks","keys_url":"https://api.github.com/repos/dschneider-pivotal/geode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dschneider-pivotal/geode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dschneider-pivotal/geode/teams","hooks_url":"https://api.github.com/repos/dschneider-pivotal/geode/hooks","issue_events_url":"https://api.github.com/repos/dschneider-pivotal/geode/issues/events{/number}","events_url":"https://api.github.com/repos/dschneider-pivotal/geode/events","assignees_url":"https://api.github.com/repos/dschneider-pivotal/geode/assignees{/user}","branches_url":"https://api.github.com/repos/dschneider-pivotal/geode/branches{/branch}","tags_url":"https://api.github.com/repos/dschneider-pivotal/geode/tags","blobs_url":"https://api.github.com/repos/dschneider-pivotal/geode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dschneider-pivotal/geode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dschneider-pivotal/geode/git/refs{/sha}","trees_url":"https://api.github.com/repos/dschneider-pivotal/geode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dschneider-pivotal/geode/statuses/{sha}","languages_url":"https://api.github.com/repos/dschneider-pivotal/geode/languages","stargazers_url":"https://api.github.com/repos/dschneider-pivotal/geode/stargazers","contributors_url":"https://api.github.com/repos/dschneider-pivotal/geode/contributors","subscribers_url":"https://api.github.com/repos/dschneider-pivotal/geode/subscribers","subscription_url":"https://api.github.com/repos/dschneider-pivotal/geode/subscription","commits_url":"https://api.github.com/repos/dschneider-pivotal/geode/commits{/sha}","git_commits_url":"https://api.github.com/repos/dschneider-pivotal/geode/git/commits{/sha}","comments_url":"https://api.github.com/repos/dschneider-pivotal/geode/comments{/number}","issue_comment_url":"https://api.github.com/repos/dschneider-pivotal/geode/issues/comments{/number}","contents_url":"https://api.github.com/repos/dschneider-pivotal/geode/contents/{+path}","compare_url":"https://api.github.com/repos/dschneider-pivotal/geode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dschneider-pivotal/geode/merges","archive_url":"https://api.github.com/repos/dschneider-pivotal/geode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dschneider-pivotal/geode/downloads","issues_url":"https://api.github.com/repos/dschneider-pivotal/geode/issues{/number}","pulls_url":"https://api.github.com/repos/dschneider-pivotal/geode/pulls{/number}","milestones_url":"https://api.github.com/repos/dschneider-pivotal/geode/milestones{/number}","notifications_url":"https://api.github.com/repos/dschneider-pivotal/geode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dschneider-pivotal/geode/labels{/name}","releases_url":"https://api.github.com/repos/dschneider-pivotal/geode/releases{/id}","deployments_url":"https://api.github.com/repos/dschneider-pivotal/geode/deployments","created_at":"2017-09-08T00:09:51Z","updated_at":"2018-09-28T01:11:36Z","pushed_at":"2019-03-30T01:13:09Z","git_url":"git://github.com/dschneider-pivotal/geode.git","ssh_url":"git@github.com:dschneider-pivotal/geode.git","clone_url":"https://github.com/dschneider-pivotal/geode.git","svn_url":"https://github.com/dschneider-pivotal/geode","homepage":"","size":172075,"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":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"apache:develop","ref":"develop","sha":"458e39b8ecaba4ed52f873f33e9c30df60d67c5d","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":34839383,"node_id":"MDEwOlJlcG9zaXRvcnkzNDgzOTM4Mw==","name":"geode","full_name":"apache/geode","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/geode","description":"Apache Geode","fork":false,"url":"https://api.github.com/repos/apache/geode","forks_url":"https://api.github.com/repos/apache/geode/forks","keys_url":"https://api.github.com/repos/apache/geode/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/geode/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/geode/teams","hooks_url":"https://api.github.com/repos/apache/geode/hooks","issue_events_url":"https://api.github.com/repos/apache/geode/issues/events{/number}","events_url":"https://api.github.com/repos/apache/geode/events","assignees_url":"https://api.github.com/repos/apache/geode/assignees{/user}","branches_url":"https://api.github.com/repos/apache/geode/branches{/branch}","tags_url":"https://api.github.com/repos/apache/geode/tags","blobs_url":"https://api.github.com/repos/apache/geode/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/geode/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/geode/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/geode/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/geode/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/geode/languages","stargazers_url":"https://api.github.com/repos/apache/geode/stargazers","contributors_url":"https://api.github.com/repos/apache/geode/contributors","subscribers_url":"https://api.github.com/repos/apache/geode/subscribers","subscription_url":"https://api.github.com/repos/apache/geode/subscription","commits_url":"https://api.github.com/repos/apache/geode/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/geode/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/geode/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/geode/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/geode/contents/{+path}","compare_url":"https://api.github.com/repos/apache/geode/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/geode/merges","archive_url":"https://api.github.com/repos/apache/geode/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/geode/downloads","issues_url":"https://api.github.com/repos/apache/geode/issues{/number}","pulls_url":"https://api.github.com/repos/apache/geode/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/geode/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/geode/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/geode/labels{/name}","releases_url":"https://api.github.com/repos/apache/geode/releases{/id}","deployments_url":"https://api.github.com/repos/apache/geode/deployments","created_at":"2015-04-30T07:00:05Z","updated_at":"2019-03-29T22:17:30Z","pushed_at":"2019-03-30T02:47:56Z","git_url":"git://github.com/apache/geode.git","ssh_url":"git@github.com:apache/geode.git","clone_url":"https://github.com/apache/geode.git","svn_url":"https://github.com/apache/geode","homepage":"","size":169847,"stargazers_count":1504,"watchers_count":1504,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":501,"mirror_url":null,"archived":false,"open_issues_count":13,"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":501,"open_issues":13,"watchers":1504,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/geode/pulls/3381"},"html":{"href":"https://github.com/apache/geode/pull/3381"},"issue":{"href":"https://api.github.com/repos/apache/geode/issues/3381"},"comments":{"href":"https://api.github.com/repos/apache/geode/issues/3381/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/geode/pulls/3381/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/geode/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/geode/pulls/3381/commits"},"statuses":{"href":"https://api.github.com/repos/apache/geode/statuses/6298f38cb69de2ef199349a217c4a619754df0fc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pivotal-jbarrett"}}