{"action":"created","comment":{"url":"https://api.github.com/repos/minio/minio/pulls/comments/77776286","id":77776286,"diff_hunk":"@@ -99,19 +101,89 @@ func hashOrder(key string, cardinality int) []int {\n \treturn nums\n }\n \n+// Constructs XLMetaV1 using `gjson` lib to retrieve each field.\n+func xlMetaV1UnmarshalJSON(xlMetaBuf []byte) (xlMetaV1, error) {\n+\n+\txlMeta := xlMetaV1{}\n+\t// obtain version.\n+\txlMeta.Version = gjson.Get(string(xlMetaBuf), \"version\").String()\n+\t// obtain format.\n+\txlMeta.Format = gjson.Get(string(xlMetaBuf), \"format\").String()\n+\t// fetching modTime.\n+\tmodTime, err := time.Parse(time.RFC3339, gjson.Get(string(xlMetaBuf), \"stat.modTime\").String())\n+\tif err != nil {\n+\t\treturn xlMetaV1{}, err\n+\t}\n+\txlMeta.Stat.ModTime = modTime\n+\t// obtain Stat.Size .\n+\txlMeta.Stat.Size = gjson.Get(string(xlMetaBuf), \"stat.size\").Int()\n+\t// parse the xlV1Meta.Erasure fields.\n+\txlMeta.Erasure = erasureInfo{}\n+\terasureResult := gjson.Get(string(xlMetaBuf), \"erasure\")\n+\t// parse the xlV1Meta.Erasure.Distribution.\n+\tdisResult := erasureResult.Get(\"distribution\").Array()\n+\n+\tdistribution := make([]int, len(disResult))\n+\tfor i, dis := range disResult {\n+\t\tdistribution[i] = int(dis.Int())\n+\t}\n+\txlMeta.Erasure.Distribution = distribution\n+\n+\txlMeta.Erasure.Algorithm = erasureResult.Get(\"algorithm\").String()\n+\txlMeta.Erasure.DataBlocks = int(erasureResult.Get(\"data\").Int())\n+\txlMeta.Erasure.ParityBlocks = int(erasureResult.Get(\"parity\").Int())\n+\txlMeta.Erasure.BlockSize = erasureResult.Get(\"blockSize\").Int()\n+\txlMeta.Erasure.Index = int(erasureResult.Get(\"index\").Int())\n+\t// Pare xlMetaV1.Erasure.Checksum array.","path":"cmd/xl-v1-utils.go","position":51,"original_position":51,"commit_id":"8861e242cf012ec802a6530da06ed07e7219c0f9","original_commit_id":"8861e242cf012ec802a6530da06ed07e7219c0f9","user":{"login":"hackintoshrao","id":2609511,"avatar_url":"https://avatars.githubusercontent.com/u/2609511?v=3","gravatar_id":"","url":"https://api.github.com/users/hackintoshrao","html_url":"https://github.com/hackintoshrao","followers_url":"https://api.github.com/users/hackintoshrao/followers","following_url":"https://api.github.com/users/hackintoshrao/following{/other_user}","gists_url":"https://api.github.com/users/hackintoshrao/gists{/gist_id}","starred_url":"https://api.github.com/users/hackintoshrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackintoshrao/subscriptions","organizations_url":"https://api.github.com/users/hackintoshrao/orgs","repos_url":"https://api.github.com/users/hackintoshrao/repos","events_url":"https://api.github.com/users/hackintoshrao/events{/privacy}","received_events_url":"https://api.github.com/users/hackintoshrao/received_events","type":"User","site_admin":false},"body":"Yes, Working on the next patch for integrating gjson for for XL functionalities, breaking it down whereas its necessary. ","created_at":"2016-09-07T08:04:21Z","updated_at":"2016-09-07T08:04:21Z","html_url":"https://github.com/minio/minio/pull/2631#discussion_r77776286","pull_request_url":"https://api.github.com/repos/minio/minio/pulls/2631","_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/comments/77776286"},"html":{"href":"https://github.com/minio/minio/pull/2631#discussion_r77776286"},"pull_request":{"href":"https://api.github.com/repos/minio/minio/pulls/2631"}}},"pull_request":{"url":"https://api.github.com/repos/minio/minio/pulls/2631","id":84240879,"html_url":"https://github.com/minio/minio/pull/2631","diff_url":"https://github.com/minio/minio/pull/2631.diff","patch_url":"https://github.com/minio/minio/pull/2631.patch","issue_url":"https://api.github.com/repos/minio/minio/issues/2631","number":2631,"state":"open","locked":false,"title":"performance:  gjson parsing for readXLMeta.","user":{"login":"hackintoshrao","id":2609511,"avatar_url":"https://avatars.githubusercontent.com/u/2609511?v=3","gravatar_id":"","url":"https://api.github.com/users/hackintoshrao","html_url":"https://github.com/hackintoshrao","followers_url":"https://api.github.com/users/hackintoshrao/followers","following_url":"https://api.github.com/users/hackintoshrao/following{/other_user}","gists_url":"https://api.github.com/users/hackintoshrao/gists{/gist_id}","starred_url":"https://api.github.com/users/hackintoshrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackintoshrao/subscriptions","organizations_url":"https://api.github.com/users/hackintoshrao/orgs","repos_url":"https://api.github.com/users/hackintoshrao/repos","events_url":"https://api.github.com/users/hackintoshrao/events{/privacy}","received_events_url":"https://api.github.com/users/hackintoshrao/received_events","type":"User","site_admin":false},"body":"- Related to https://github.com/minio/minio/issues/2208 , First set of change. \r\n- Using gjson for constructing xlMetaV1{} in realXLMeta.\r\n- Test for parsing constructing xlMetaV1{} using gjson.\r\n- Changes made since benchmarks showed 30-40% improvement in speed.\r\n- Follow up comments in issue https://github.com/minio/minio/issues/2208\r\n  for more details.","created_at":"2016-09-07T05:57:34Z","updated_at":"2016-09-07T08:04:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29fed62e9624be06f617dfef48c11943b897f103","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/minio/minio/pulls/2631/commits","review_comments_url":"https://api.github.com/repos/minio/minio/pulls/2631/comments","review_comment_url":"https://api.github.com/repos/minio/minio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/minio/minio/issues/2631/comments","statuses_url":"https://api.github.com/repos/minio/minio/statuses/8861e242cf012ec802a6530da06ed07e7219c0f9","head":{"label":"hackintoshrao:distributed","ref":"distributed","sha":"8861e242cf012ec802a6530da06ed07e7219c0f9","user":{"login":"hackintoshrao","id":2609511,"avatar_url":"https://avatars.githubusercontent.com/u/2609511?v=3","gravatar_id":"","url":"https://api.github.com/users/hackintoshrao","html_url":"https://github.com/hackintoshrao","followers_url":"https://api.github.com/users/hackintoshrao/followers","following_url":"https://api.github.com/users/hackintoshrao/following{/other_user}","gists_url":"https://api.github.com/users/hackintoshrao/gists{/gist_id}","starred_url":"https://api.github.com/users/hackintoshrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackintoshrao/subscriptions","organizations_url":"https://api.github.com/users/hackintoshrao/orgs","repos_url":"https://api.github.com/users/hackintoshrao/repos","events_url":"https://api.github.com/users/hackintoshrao/events{/privacy}","received_events_url":"https://api.github.com/users/hackintoshrao/received_events","type":"User","site_admin":false},"repo":{"id":50016634,"name":"minio","full_name":"hackintoshrao/minio","owner":{"login":"hackintoshrao","id":2609511,"avatar_url":"https://avatars.githubusercontent.com/u/2609511?v=3","gravatar_id":"","url":"https://api.github.com/users/hackintoshrao","html_url":"https://github.com/hackintoshrao","followers_url":"https://api.github.com/users/hackintoshrao/followers","following_url":"https://api.github.com/users/hackintoshrao/following{/other_user}","gists_url":"https://api.github.com/users/hackintoshrao/gists{/gist_id}","starred_url":"https://api.github.com/users/hackintoshrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackintoshrao/subscriptions","organizations_url":"https://api.github.com/users/hackintoshrao/orgs","repos_url":"https://api.github.com/users/hackintoshrao/repos","events_url":"https://api.github.com/users/hackintoshrao/events{/privacy}","received_events_url":"https://api.github.com/users/hackintoshrao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hackintoshrao/minio","description":"Cloud Storage Server for Micro Services.","fork":true,"url":"https://api.github.com/repos/hackintoshrao/minio","forks_url":"https://api.github.com/repos/hackintoshrao/minio/forks","keys_url":"https://api.github.com/repos/hackintoshrao/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackintoshrao/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackintoshrao/minio/teams","hooks_url":"https://api.github.com/repos/hackintoshrao/minio/hooks","issue_events_url":"https://api.github.com/repos/hackintoshrao/minio/issues/events{/number}","events_url":"https://api.github.com/repos/hackintoshrao/minio/events","assignees_url":"https://api.github.com/repos/hackintoshrao/minio/assignees{/user}","branches_url":"https://api.github.com/repos/hackintoshrao/minio/branches{/branch}","tags_url":"https://api.github.com/repos/hackintoshrao/minio/tags","blobs_url":"https://api.github.com/repos/hackintoshrao/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackintoshrao/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackintoshrao/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackintoshrao/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackintoshrao/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/hackintoshrao/minio/languages","stargazers_url":"https://api.github.com/repos/hackintoshrao/minio/stargazers","contributors_url":"https://api.github.com/repos/hackintoshrao/minio/contributors","subscribers_url":"https://api.github.com/repos/hackintoshrao/minio/subscribers","subscription_url":"https://api.github.com/repos/hackintoshrao/minio/subscription","commits_url":"https://api.github.com/repos/hackintoshrao/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackintoshrao/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackintoshrao/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackintoshrao/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackintoshrao/minio/contents/{+path}","compare_url":"https://api.github.com/repos/hackintoshrao/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackintoshrao/minio/merges","archive_url":"https://api.github.com/repos/hackintoshrao/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackintoshrao/minio/downloads","issues_url":"https://api.github.com/repos/hackintoshrao/minio/issues{/number}","pulls_url":"https://api.github.com/repos/hackintoshrao/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/hackintoshrao/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/hackintoshrao/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackintoshrao/minio/labels{/name}","releases_url":"https://api.github.com/repos/hackintoshrao/minio/releases{/id}","deployments_url":"https://api.github.com/repos/hackintoshrao/minio/deployments","created_at":"2016-01-20T08:41:07Z","updated_at":"2016-01-20T08:41:08Z","pushed_at":"2016-09-07T06:51:37Z","git_url":"git://github.com/hackintoshrao/minio.git","ssh_url":"git@github.com:hackintoshrao/minio.git","clone_url":"https://github.com/hackintoshrao/minio.git","svn_url":"https://github.com/hackintoshrao/minio","homepage":"","size":15967,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"minio:distributed","ref":"distributed","sha":"347a94bc7c8b8f0002d69f869f01af4c276d3da9","user":{"login":"minio","id":695951,"avatar_url":"https://avatars.githubusercontent.com/u/695951?v=3","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"repo":{"id":29261473,"name":"minio","full_name":"minio/minio","owner":{"login":"minio","id":695951,"avatar_url":"https://avatars.githubusercontent.com/u/695951?v=3","gravatar_id":"","url":"https://api.github.com/users/minio","html_url":"https://github.com/minio","followers_url":"https://api.github.com/users/minio/followers","following_url":"https://api.github.com/users/minio/following{/other_user}","gists_url":"https://api.github.com/users/minio/gists{/gist_id}","starred_url":"https://api.github.com/users/minio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minio/subscriptions","organizations_url":"https://api.github.com/users/minio/orgs","repos_url":"https://api.github.com/users/minio/repos","events_url":"https://api.github.com/users/minio/events{/privacy}","received_events_url":"https://api.github.com/users/minio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/minio/minio","description":"Minio is an object storage server compatible with Amazon S3 and licensed under Apache 2.0 License","fork":false,"url":"https://api.github.com/repos/minio/minio","forks_url":"https://api.github.com/repos/minio/minio/forks","keys_url":"https://api.github.com/repos/minio/minio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/minio/minio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/minio/minio/teams","hooks_url":"https://api.github.com/repos/minio/minio/hooks","issue_events_url":"https://api.github.com/repos/minio/minio/issues/events{/number}","events_url":"https://api.github.com/repos/minio/minio/events","assignees_url":"https://api.github.com/repos/minio/minio/assignees{/user}","branches_url":"https://api.github.com/repos/minio/minio/branches{/branch}","tags_url":"https://api.github.com/repos/minio/minio/tags","blobs_url":"https://api.github.com/repos/minio/minio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/minio/minio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/minio/minio/git/refs{/sha}","trees_url":"https://api.github.com/repos/minio/minio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/minio/minio/statuses/{sha}","languages_url":"https://api.github.com/repos/minio/minio/languages","stargazers_url":"https://api.github.com/repos/minio/minio/stargazers","contributors_url":"https://api.github.com/repos/minio/minio/contributors","subscribers_url":"https://api.github.com/repos/minio/minio/subscribers","subscription_url":"https://api.github.com/repos/minio/minio/subscription","commits_url":"https://api.github.com/repos/minio/minio/commits{/sha}","git_commits_url":"https://api.github.com/repos/minio/minio/git/commits{/sha}","comments_url":"https://api.github.com/repos/minio/minio/comments{/number}","issue_comment_url":"https://api.github.com/repos/minio/minio/issues/comments{/number}","contents_url":"https://api.github.com/repos/minio/minio/contents/{+path}","compare_url":"https://api.github.com/repos/minio/minio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/minio/minio/merges","archive_url":"https://api.github.com/repos/minio/minio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/minio/minio/downloads","issues_url":"https://api.github.com/repos/minio/minio/issues{/number}","pulls_url":"https://api.github.com/repos/minio/minio/pulls{/number}","milestones_url":"https://api.github.com/repos/minio/minio/milestones{/number}","notifications_url":"https://api.github.com/repos/minio/minio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/minio/minio/labels{/name}","releases_url":"https://api.github.com/repos/minio/minio/releases{/id}","deployments_url":"https://api.github.com/repos/minio/minio/deployments","created_at":"2015-01-14T19:23:58Z","updated_at":"2016-09-07T07:23:32Z","pushed_at":"2016-09-07T06:51:37Z","git_url":"git://github.com/minio/minio.git","ssh_url":"git@github.com:minio/minio.git","clone_url":"https://github.com/minio/minio.git","svn_url":"https://github.com/minio/minio","homepage":"https://minio.io","size":17858,"stargazers_count":3849,"watchers_count":3849,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":228,"mirror_url":null,"open_issues_count":50,"forks":228,"open_issues":50,"watchers":3849,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/minio/minio/pulls/2631"},"html":{"href":"https://github.com/minio/minio/pull/2631"},"issue":{"href":"https://api.github.com/repos/minio/minio/issues/2631"},"comments":{"href":"https://api.github.com/repos/minio/minio/issues/2631/comments"},"review_comments":{"href":"https://api.github.com/repos/minio/minio/pulls/2631/comments"},"review_comment":{"href":"https://api.github.com/repos/minio/minio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/minio/minio/pulls/2631/commits"},"statuses":{"href":"https://api.github.com/repos/minio/minio/statuses/8861e242cf012ec802a6530da06ed07e7219c0f9"}}}}
{"actor":{"display_login":"hackintoshrao"}}