{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/xcbuild/pulls/comments/74669159","id":74669159,"diff_hunk":"@@ -245,9 +255,16 @@ bom_index_add(struct bom_context *context, const void *data, size_t data_len)\n     struct bom_index_header *index_header = (struct bom_index_header *)((void *)header + ntohl(header->index_offset));\n \n     /* Insert index at the end of the list. */\n+    bool resize = true;\n+    if (context->preallocated_index_count > 0) {","path":"Libraries/libbom/Sources/bom.c","position":45,"original_position":45,"commit_id":"83a36748c0c0c4df2f96369ff68a2468f4ca885a","original_commit_id":"0b0b0cda511ce7ff5b7144722b5c35dae7b6f635","user":{"login":"marcsalem","id":633000,"avatar_url":"https://avatars.githubusercontent.com/u/633000?v=3","gravatar_id":"","url":"https://api.github.com/users/marcsalem","html_url":"https://github.com/marcsalem","followers_url":"https://api.github.com/users/marcsalem/followers","following_url":"https://api.github.com/users/marcsalem/following{/other_user}","gists_url":"https://api.github.com/users/marcsalem/gists{/gist_id}","starred_url":"https://api.github.com/users/marcsalem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcsalem/subscriptions","organizations_url":"https://api.github.com/users/marcsalem/orgs","repos_url":"https://api.github.com/users/marcsalem/repos","events_url":"https://api.github.com/users/marcsalem/events{/privacy}","received_events_url":"https://api.github.com/users/marcsalem/received_events","type":"User","site_admin":false},"body":"Sure, I could calculate out the new size of the index list and compare it to index_length in the bom header. But that is a lot more work compared to keeping track in a counter.\r\n\r\nAlso, the size calculation would have to compensate for those two extra slots that are needed empty at the end, which means keeping track of this special requirement in more than one place.\r\n","created_at":"2016-08-12T22:24:12Z","updated_at":"2016-08-12T22:24:12Z","html_url":"https://github.com/facebook/xcbuild/pull/107#discussion_r74669159","pull_request_url":"https://api.github.com/repos/facebook/xcbuild/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/comments/74669159"},"html":{"href":"https://github.com/facebook/xcbuild/pull/107#discussion_r74669159"},"pull_request":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/xcbuild/pulls/107","id":81057456,"html_url":"https://github.com/facebook/xcbuild/pull/107","diff_url":"https://github.com/facebook/xcbuild/pull/107.diff","patch_url":"https://github.com/facebook/xcbuild/pull/107.patch","issue_url":"https://api.github.com/repos/facebook/xcbuild/issues/107","number":107,"state":"open","locked":false,"title":"Make reading and writing CAR files faster","user":{"login":"marcsalem","id":633000,"avatar_url":"https://avatars.githubusercontent.com/u/633000?v=3","gravatar_id":"","url":"https://api.github.com/users/marcsalem","html_url":"https://github.com/marcsalem","followers_url":"https://api.github.com/users/marcsalem/followers","following_url":"https://api.github.com/users/marcsalem/following{/other_user}","gists_url":"https://api.github.com/users/marcsalem/gists{/gist_id}","starred_url":"https://api.github.com/users/marcsalem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcsalem/subscriptions","organizations_url":"https://api.github.com/users/marcsalem/orgs","repos_url":"https://api.github.com/users/marcsalem/repos","events_url":"https://api.github.com/users/marcsalem/events{/privacy}","received_events_url":"https://api.github.com/users/marcsalem/received_events","type":"User","site_admin":false},"body":"Avoid memmoves in the libbom by optionally preallocating space for the indexes\r\nAllow raw reads and writes of rendition key-value pairs\r\nAllow specifying the key format to the writer","created_at":"2016-08-12T01:42:07Z","updated_at":"2016-08-12T22:24:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6046cfbd906e0da61e3bd3fe8964317dd3857479","assignee":{"login":"grp","id":163390,"avatar_url":"https://avatars.githubusercontent.com/u/163390?v=3","gravatar_id":"","url":"https://api.github.com/users/grp","html_url":"https://github.com/grp","followers_url":"https://api.github.com/users/grp/followers","following_url":"https://api.github.com/users/grp/following{/other_user}","gists_url":"https://api.github.com/users/grp/gists{/gist_id}","starred_url":"https://api.github.com/users/grp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grp/subscriptions","organizations_url":"https://api.github.com/users/grp/orgs","repos_url":"https://api.github.com/users/grp/repos","events_url":"https://api.github.com/users/grp/events{/privacy}","received_events_url":"https://api.github.com/users/grp/received_events","type":"User","site_admin":false},"assignees":[{"login":"grp","id":163390,"avatar_url":"https://avatars.githubusercontent.com/u/163390?v=3","gravatar_id":"","url":"https://api.github.com/users/grp","html_url":"https://github.com/grp","followers_url":"https://api.github.com/users/grp/followers","following_url":"https://api.github.com/users/grp/following{/other_user}","gists_url":"https://api.github.com/users/grp/gists{/gist_id}","starred_url":"https://api.github.com/users/grp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grp/subscriptions","organizations_url":"https://api.github.com/users/grp/orgs","repos_url":"https://api.github.com/users/grp/repos","events_url":"https://api.github.com/users/grp/events{/privacy}","received_events_url":"https://api.github.com/users/grp/received_events","type":"User","site_admin":false},{"login":"Ktwu","id":470651,"avatar_url":"https://avatars.githubusercontent.com/u/470651?v=3","gravatar_id":"","url":"https://api.github.com/users/Ktwu","html_url":"https://github.com/Ktwu","followers_url":"https://api.github.com/users/Ktwu/followers","following_url":"https://api.github.com/users/Ktwu/following{/other_user}","gists_url":"https://api.github.com/users/Ktwu/gists{/gist_id}","starred_url":"https://api.github.com/users/Ktwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ktwu/subscriptions","organizations_url":"https://api.github.com/users/Ktwu/orgs","repos_url":"https://api.github.com/users/Ktwu/repos","events_url":"https://api.github.com/users/Ktwu/events{/privacy}","received_events_url":"https://api.github.com/users/Ktwu/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/xcbuild/pulls/107/commits","review_comments_url":"https://api.github.com/repos/facebook/xcbuild/pulls/107/comments","review_comment_url":"https://api.github.com/repos/facebook/xcbuild/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/xcbuild/issues/107/comments","statuses_url":"https://api.github.com/repos/facebook/xcbuild/statuses/83a36748c0c0c4df2f96369ff68a2468f4ca885a","head":{"label":"facebook:marcsalem/fast-car","ref":"marcsalem/fast-car","sha":"83a36748c0c0c4df2f96369ff68a2468f4ca885a","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":43019030,"name":"xcbuild","full_name":"facebook/xcbuild","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/xcbuild","description":"Xcode-compatible build tool.","fork":false,"url":"https://api.github.com/repos/facebook/xcbuild","forks_url":"https://api.github.com/repos/facebook/xcbuild/forks","keys_url":"https://api.github.com/repos/facebook/xcbuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/xcbuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/xcbuild/teams","hooks_url":"https://api.github.com/repos/facebook/xcbuild/hooks","issue_events_url":"https://api.github.com/repos/facebook/xcbuild/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/xcbuild/events","assignees_url":"https://api.github.com/repos/facebook/xcbuild/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/xcbuild/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/xcbuild/tags","blobs_url":"https://api.github.com/repos/facebook/xcbuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/xcbuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/xcbuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/xcbuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/xcbuild/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/xcbuild/languages","stargazers_url":"https://api.github.com/repos/facebook/xcbuild/stargazers","contributors_url":"https://api.github.com/repos/facebook/xcbuild/contributors","subscribers_url":"https://api.github.com/repos/facebook/xcbuild/subscribers","subscription_url":"https://api.github.com/repos/facebook/xcbuild/subscription","commits_url":"https://api.github.com/repos/facebook/xcbuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/xcbuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/xcbuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/xcbuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/xcbuild/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/xcbuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/xcbuild/merges","archive_url":"https://api.github.com/repos/facebook/xcbuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/xcbuild/downloads","issues_url":"https://api.github.com/repos/facebook/xcbuild/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/xcbuild/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/xcbuild/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/xcbuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/xcbuild/labels{/name}","releases_url":"https://api.github.com/repos/facebook/xcbuild/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/xcbuild/deployments","created_at":"2015-09-23T18:24:01Z","updated_at":"2016-08-10T09:32:39Z","pushed_at":"2016-08-12T03:31:29Z","git_url":"git://github.com/facebook/xcbuild.git","ssh_url":"git@github.com:facebook/xcbuild.git","clone_url":"https://github.com/facebook/xcbuild.git","svn_url":"https://github.com/facebook/xcbuild","homepage":null,"size":3813,"stargazers_count":1036,"watchers_count":1036,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":31,"forks":53,"open_issues":31,"watchers":1036,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"7fbcb6a09793e9e06d8e8b077ac600ee42c3d2a6","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":43019030,"name":"xcbuild","full_name":"facebook/xcbuild","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/xcbuild","description":"Xcode-compatible build tool.","fork":false,"url":"https://api.github.com/repos/facebook/xcbuild","forks_url":"https://api.github.com/repos/facebook/xcbuild/forks","keys_url":"https://api.github.com/repos/facebook/xcbuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/xcbuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/xcbuild/teams","hooks_url":"https://api.github.com/repos/facebook/xcbuild/hooks","issue_events_url":"https://api.github.com/repos/facebook/xcbuild/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/xcbuild/events","assignees_url":"https://api.github.com/repos/facebook/xcbuild/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/xcbuild/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/xcbuild/tags","blobs_url":"https://api.github.com/repos/facebook/xcbuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/xcbuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/xcbuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/xcbuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/xcbuild/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/xcbuild/languages","stargazers_url":"https://api.github.com/repos/facebook/xcbuild/stargazers","contributors_url":"https://api.github.com/repos/facebook/xcbuild/contributors","subscribers_url":"https://api.github.com/repos/facebook/xcbuild/subscribers","subscription_url":"https://api.github.com/repos/facebook/xcbuild/subscription","commits_url":"https://api.github.com/repos/facebook/xcbuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/xcbuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/xcbuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/xcbuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/xcbuild/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/xcbuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/xcbuild/merges","archive_url":"https://api.github.com/repos/facebook/xcbuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/xcbuild/downloads","issues_url":"https://api.github.com/repos/facebook/xcbuild/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/xcbuild/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/xcbuild/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/xcbuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/xcbuild/labels{/name}","releases_url":"https://api.github.com/repos/facebook/xcbuild/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/xcbuild/deployments","created_at":"2015-09-23T18:24:01Z","updated_at":"2016-08-10T09:32:39Z","pushed_at":"2016-08-12T03:31:29Z","git_url":"git://github.com/facebook/xcbuild.git","ssh_url":"git@github.com:facebook/xcbuild.git","clone_url":"https://github.com/facebook/xcbuild.git","svn_url":"https://github.com/facebook/xcbuild","homepage":null,"size":3813,"stargazers_count":1036,"watchers_count":1036,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":31,"forks":53,"open_issues":31,"watchers":1036,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/107"},"html":{"href":"https://github.com/facebook/xcbuild/pull/107"},"issue":{"href":"https://api.github.com/repos/facebook/xcbuild/issues/107"},"comments":{"href":"https://api.github.com/repos/facebook/xcbuild/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/xcbuild/statuses/83a36748c0c0c4df2f96369ff68a2468f4ca885a"}}}}
{"actor":{"display_login":"marcsalem"}}