{"action":"created","comment":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/89536506","pull_request_review_id":10082444,"id":89536506,"diff_hunk":"@@ -370,8 +414,189 @@ private void writeNonNullableObject(Object obj, BytesObjectOutput out) throws IO\n       }\n    }\n \n+   private void writeArray(Class<?> clazz, Object array, BytesObjectOutput out) throws IOException {\n+      out.writeByte(ID_ARRAY);\n+      Class<?> componentType = clazz.getComponentType();\n+\n+      int length = Array.getLength(array);\n+      boolean singleType = true;\n+      Class<?> elementType = null;\n+      int flags;\n+      if (length == 0) {\n+         flags = FLAG_ARRAY_EMPTY;\n+      } else {\n+         if (length <= Primitives.SMALL_ARRAY_MAX) {\n+            flags = FLAG_ARRAY_SMALL;\n+         } else if (length <= Primitives.MEDIUM_ARRAY_MAX) {\n+            flags = FLAG_ARRAY_MEDIUM;\n+         } else {\n+            flags = FLAG_ARRAY_LARGE;\n+         }\n+         Object firstElement = Array.get(array, 0);\n+         if (firstElement != null) {\n+            elementType = firstElement.getClass();\n+         }\n+         for (int i = 1; i < length; ++i) {","path":"core/src/main/java/org/infinispan/marshall/core/GlobalMarshaller.java","position":113,"original_position":113,"commit_id":"01b422fa84e19c7983f74293aae70ff88b999da9","original_commit_id":"01b422fa84e19c7983f74293aae70ff88b999da9","user":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"body":"I would assume that just checking all the elements is pretty cheap, compared to everything else that's going on there. However, assuming that and backing off is an interesting strategy, I'll think about that. Not sure if that's worth the effort, though.\r\n\r\nAd creating the array 'ourselves' - this is a generic marshalling code, I don't see how would you pass that hint to marshaller from the place where you create the array.","created_at":"2016-11-24T18:18:38Z","updated_at":"2016-11-24T18:18:39Z","html_url":"https://github.com/infinispan/infinispan/pull/4681#discussion_r89536506","pull_request_url":"https://api.github.com/repos/infinispan/infinispan/pulls/4681","_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments/89536506"},"html":{"href":"https://github.com/infinispan/infinispan/pull/4681#discussion_r89536506"},"pull_request":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4681"}}},"pull_request":{"url":"https://api.github.com/repos/infinispan/infinispan/pulls/4681","id":95190065,"html_url":"https://github.com/infinispan/infinispan/pull/4681","diff_url":"https://github.com/infinispan/infinispan/pull/4681.diff","patch_url":"https://github.com/infinispan/infinispan/pull/4681.patch","issue_url":"https://api.github.com/repos/infinispan/infinispan/issues/4681","number":4681,"state":"open","locked":false,"title":"ISPN-7229 Marshalling arrays throws exception","user":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"body":"* Replace ArrayExternalizers with array support in GlobalMarshaller\r\n* If all the elements of array use the same externalizer, pack it only once\r\n* Use ClassIdentifiers to efficiently encode array component type\r\n* Change medium array boundary to cover maximum range\r\n\r\nhttps://issues.jboss.org/browse/ISPN-7229","created_at":"2016-11-24T14:44:18Z","updated_at":"2016-11-24T18:18:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ede334239e1b4d7b832e3dc57d82aaa932e684b7","assignee":{"login":"galderz","id":50187,"avatar_url":"https://avatars.githubusercontent.com/u/50187?v=3","gravatar_id":"","url":"https://api.github.com/users/galderz","html_url":"https://github.com/galderz","followers_url":"https://api.github.com/users/galderz/followers","following_url":"https://api.github.com/users/galderz/following{/other_user}","gists_url":"https://api.github.com/users/galderz/gists{/gist_id}","starred_url":"https://api.github.com/users/galderz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galderz/subscriptions","organizations_url":"https://api.github.com/users/galderz/orgs","repos_url":"https://api.github.com/users/galderz/repos","events_url":"https://api.github.com/users/galderz/events{/privacy}","received_events_url":"https://api.github.com/users/galderz/received_events","type":"User","site_admin":false},"assignees":[{"login":"galderz","id":50187,"avatar_url":"https://avatars.githubusercontent.com/u/50187?v=3","gravatar_id":"","url":"https://api.github.com/users/galderz","html_url":"https://github.com/galderz","followers_url":"https://api.github.com/users/galderz/followers","following_url":"https://api.github.com/users/galderz/following{/other_user}","gists_url":"https://api.github.com/users/galderz/gists{/gist_id}","starred_url":"https://api.github.com/users/galderz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galderz/subscriptions","organizations_url":"https://api.github.com/users/galderz/orgs","repos_url":"https://api.github.com/users/galderz/repos","events_url":"https://api.github.com/users/galderz/events{/privacy}","received_events_url":"https://api.github.com/users/galderz/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/infinispan/infinispan/pulls/4681/commits","review_comments_url":"https://api.github.com/repos/infinispan/infinispan/pulls/4681/comments","review_comment_url":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/infinispan/infinispan/issues/4681/comments","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/01b422fa84e19c7983f74293aae70ff88b999da9","head":{"label":"rvansa:ISPN-7229","ref":"ISPN-7229","sha":"01b422fa84e19c7983f74293aae70ff88b999da9","user":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"repo":{"id":8481591,"name":"infinispan","full_name":"rvansa/infinispan","owner":{"login":"rvansa","id":2167869,"avatar_url":"https://avatars.githubusercontent.com/u/2167869?v=3","gravatar_id":"","url":"https://api.github.com/users/rvansa","html_url":"https://github.com/rvansa","followers_url":"https://api.github.com/users/rvansa/followers","following_url":"https://api.github.com/users/rvansa/following{/other_user}","gists_url":"https://api.github.com/users/rvansa/gists{/gist_id}","starred_url":"https://api.github.com/users/rvansa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvansa/subscriptions","organizations_url":"https://api.github.com/users/rvansa/orgs","repos_url":"https://api.github.com/users/rvansa/repos","events_url":"https://api.github.com/users/rvansa/events{/privacy}","received_events_url":"https://api.github.com/users/rvansa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rvansa/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":true,"url":"https://api.github.com/repos/rvansa/infinispan","forks_url":"https://api.github.com/repos/rvansa/infinispan/forks","keys_url":"https://api.github.com/repos/rvansa/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rvansa/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rvansa/infinispan/teams","hooks_url":"https://api.github.com/repos/rvansa/infinispan/hooks","issue_events_url":"https://api.github.com/repos/rvansa/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/rvansa/infinispan/events","assignees_url":"https://api.github.com/repos/rvansa/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/rvansa/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/rvansa/infinispan/tags","blobs_url":"https://api.github.com/repos/rvansa/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rvansa/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rvansa/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/rvansa/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rvansa/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/rvansa/infinispan/languages","stargazers_url":"https://api.github.com/repos/rvansa/infinispan/stargazers","contributors_url":"https://api.github.com/repos/rvansa/infinispan/contributors","subscribers_url":"https://api.github.com/repos/rvansa/infinispan/subscribers","subscription_url":"https://api.github.com/repos/rvansa/infinispan/subscription","commits_url":"https://api.github.com/repos/rvansa/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/rvansa/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/rvansa/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/rvansa/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/rvansa/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/rvansa/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rvansa/infinispan/merges","archive_url":"https://api.github.com/repos/rvansa/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rvansa/infinispan/downloads","issues_url":"https://api.github.com/repos/rvansa/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/rvansa/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/rvansa/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/rvansa/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rvansa/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/rvansa/infinispan/releases{/id}","deployments_url":"https://api.github.com/repos/rvansa/infinispan/deployments","created_at":"2013-02-28T15:13:16Z","updated_at":"2015-05-05T17:20:40Z","pushed_at":"2016-11-24T15:13:03Z","git_url":"git://github.com/rvansa/infinispan.git","ssh_url":"git@github.com:rvansa/infinispan.git","clone_url":"https://github.com/rvansa/infinispan.git","svn_url":"https://github.com/rvansa/infinispan","homepage":"http://www.infinispan.org","size":85451,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"infinispan:master","ref":"master","sha":"fdc6d3cfe039c1e731525ed3a2faa7d2ce4abec9","user":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"repo":{"id":1050944,"name":"infinispan","full_name":"infinispan/infinispan","owner":{"login":"infinispan","id":458093,"avatar_url":"https://avatars.githubusercontent.com/u/458093?v=3","gravatar_id":"","url":"https://api.github.com/users/infinispan","html_url":"https://github.com/infinispan","followers_url":"https://api.github.com/users/infinispan/followers","following_url":"https://api.github.com/users/infinispan/following{/other_user}","gists_url":"https://api.github.com/users/infinispan/gists{/gist_id}","starred_url":"https://api.github.com/users/infinispan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infinispan/subscriptions","organizations_url":"https://api.github.com/users/infinispan/orgs","repos_url":"https://api.github.com/users/infinispan/repos","events_url":"https://api.github.com/users/infinispan/events{/privacy}","received_events_url":"https://api.github.com/users/infinispan/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/infinispan/infinispan","description":"Infinispan is an open source data grid platform and highly scalable NoSQL cloud data store.","fork":false,"url":"https://api.github.com/repos/infinispan/infinispan","forks_url":"https://api.github.com/repos/infinispan/infinispan/forks","keys_url":"https://api.github.com/repos/infinispan/infinispan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/infinispan/infinispan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/infinispan/infinispan/teams","hooks_url":"https://api.github.com/repos/infinispan/infinispan/hooks","issue_events_url":"https://api.github.com/repos/infinispan/infinispan/issues/events{/number}","events_url":"https://api.github.com/repos/infinispan/infinispan/events","assignees_url":"https://api.github.com/repos/infinispan/infinispan/assignees{/user}","branches_url":"https://api.github.com/repos/infinispan/infinispan/branches{/branch}","tags_url":"https://api.github.com/repos/infinispan/infinispan/tags","blobs_url":"https://api.github.com/repos/infinispan/infinispan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/infinispan/infinispan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/infinispan/infinispan/git/refs{/sha}","trees_url":"https://api.github.com/repos/infinispan/infinispan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/infinispan/infinispan/statuses/{sha}","languages_url":"https://api.github.com/repos/infinispan/infinispan/languages","stargazers_url":"https://api.github.com/repos/infinispan/infinispan/stargazers","contributors_url":"https://api.github.com/repos/infinispan/infinispan/contributors","subscribers_url":"https://api.github.com/repos/infinispan/infinispan/subscribers","subscription_url":"https://api.github.com/repos/infinispan/infinispan/subscription","commits_url":"https://api.github.com/repos/infinispan/infinispan/commits{/sha}","git_commits_url":"https://api.github.com/repos/infinispan/infinispan/git/commits{/sha}","comments_url":"https://api.github.com/repos/infinispan/infinispan/comments{/number}","issue_comment_url":"https://api.github.com/repos/infinispan/infinispan/issues/comments{/number}","contents_url":"https://api.github.com/repos/infinispan/infinispan/contents/{+path}","compare_url":"https://api.github.com/repos/infinispan/infinispan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/infinispan/infinispan/merges","archive_url":"https://api.github.com/repos/infinispan/infinispan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/infinispan/infinispan/downloads","issues_url":"https://api.github.com/repos/infinispan/infinispan/issues{/number}","pulls_url":"https://api.github.com/repos/infinispan/infinispan/pulls{/number}","milestones_url":"https://api.github.com/repos/infinispan/infinispan/milestones{/number}","notifications_url":"https://api.github.com/repos/infinispan/infinispan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/infinispan/infinispan/labels{/name}","releases_url":"https://api.github.com/repos/infinispan/infinispan/releases{/id}","deployments_url":"https://api.github.com/repos/infinispan/infinispan/deployments","created_at":"2010-11-04T12:33:19Z","updated_at":"2016-11-24T07:50:12Z","pushed_at":"2016-11-24T15:16:19Z","git_url":"git://github.com/infinispan/infinispan.git","ssh_url":"git@github.com:infinispan/infinispan.git","clone_url":"https://github.com/infinispan/infinispan.git","svn_url":"https://github.com/infinispan/infinispan","homepage":"http://www.infinispan.org","size":108181,"stargazers_count":507,"watchers_count":507,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":368,"mirror_url":null,"open_issues_count":30,"forks":368,"open_issues":30,"watchers":507,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4681"},"html":{"href":"https://github.com/infinispan/infinispan/pull/4681"},"issue":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/4681"},"comments":{"href":"https://api.github.com/repos/infinispan/infinispan/issues/4681/comments"},"review_comments":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4681/comments"},"review_comment":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/infinispan/infinispan/pulls/4681/commits"},"statuses":{"href":"https://api.github.com/repos/infinispan/infinispan/statuses/01b422fa84e19c7983f74293aae70ff88b999da9"}}}}
{"actor":{"display_login":"rvansa"}}