{"action":"closed","number":349,"pull_request":{"url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/349","id":332360001,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMyMzYwMDAx","html_url":"https://github.com/alexcrichton/toml-rs/pull/349","diff_url":"https://github.com/alexcrichton/toml-rs/pull/349.diff","patch_url":"https://github.com/alexcrichton/toml-rs/pull/349.patch","issue_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/349","number":349,"state":"closed","locked":false,"title":"Decrease deserialization complexity from quadratic to linear","user":{"login":"est31","id":8872119,"node_id":"MDQ6VXNlcjg4NzIxMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/8872119?v=4","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"body":"Fixes #342.\r\n\r\nIn particular, see my comment https://github.com/alexcrichton/toml-rs/issues/342#issuecomment-546190394\r\n\r\nValues that I recorded on my machine for running the code `measure_time(n, |i| format!(\"[header_no_{}]\\n\", i))` function for varying `n`:\r\n\r\n| benchmark  | optimizations | before this PR | after this PR |\r\n|------------|---------------|----------------|---------------|\r\n|          1k|             no|           170ms|           48ms|\r\n|         10k|             no|         14 191ms|          483ms|\r\n|        100k|             no|             n/a|         5 077ms|\r\n|          1k|            yes|             5ms|            4ms|\r\n|         10k|            yes|           311ms|           39ms|\r\n|        100k|            yes|         63 850ms|          364ms|\r\n\r\nYou can nicely see how before this PR, a 10x increase in data meant a 100x increase in time spent, while after the PR it only means a 10x increase.","created_at":"2019-10-25T06:27:09Z","updated_at":"2019-10-28T15:05:15Z","closed_at":"2019-10-28T15:05:14Z","merged_at":"2019-10-28T15:05:14Z","merge_commit_sha":"c049b7aaec0d6badc96c0f7d2ec3cd53ed59d751","assignee":null,"assignees":[],"requested_reviewers":[{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/349/commits","review_comments_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/349/comments","review_comment_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/349/comments","statuses_url":"https://api.github.com/repos/alexcrichton/toml-rs/statuses/37484d5c37c49cf4ec86c2a9d62fbb44915e5ece","head":{"label":"est31:speedup","ref":"speedup","sha":"37484d5c37c49cf4ec86c2a9d62fbb44915e5ece","user":{"login":"est31","id":8872119,"node_id":"MDQ6VXNlcjg4NzIxMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/8872119?v=4","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"repo":{"id":203939850,"node_id":"MDEwOlJlcG9zaXRvcnkyMDM5Mzk4NTA=","name":"toml-rs","full_name":"est31/toml-rs","private":false,"owner":{"login":"est31","id":8872119,"node_id":"MDQ6VXNlcjg4NzIxMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/8872119?v=4","gravatar_id":"","url":"https://api.github.com/users/est31","html_url":"https://github.com/est31","followers_url":"https://api.github.com/users/est31/followers","following_url":"https://api.github.com/users/est31/following{/other_user}","gists_url":"https://api.github.com/users/est31/gists{/gist_id}","starred_url":"https://api.github.com/users/est31/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/est31/subscriptions","organizations_url":"https://api.github.com/users/est31/orgs","repos_url":"https://api.github.com/users/est31/repos","events_url":"https://api.github.com/users/est31/events{/privacy}","received_events_url":"https://api.github.com/users/est31/received_events","type":"User","site_admin":false},"html_url":"https://github.com/est31/toml-rs","description":"A TOML encoding/decoding library for Rust","fork":true,"url":"https://api.github.com/repos/est31/toml-rs","forks_url":"https://api.github.com/repos/est31/toml-rs/forks","keys_url":"https://api.github.com/repos/est31/toml-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/est31/toml-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/est31/toml-rs/teams","hooks_url":"https://api.github.com/repos/est31/toml-rs/hooks","issue_events_url":"https://api.github.com/repos/est31/toml-rs/issues/events{/number}","events_url":"https://api.github.com/repos/est31/toml-rs/events","assignees_url":"https://api.github.com/repos/est31/toml-rs/assignees{/user}","branches_url":"https://api.github.com/repos/est31/toml-rs/branches{/branch}","tags_url":"https://api.github.com/repos/est31/toml-rs/tags","blobs_url":"https://api.github.com/repos/est31/toml-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/est31/toml-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/est31/toml-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/est31/toml-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/est31/toml-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/est31/toml-rs/languages","stargazers_url":"https://api.github.com/repos/est31/toml-rs/stargazers","contributors_url":"https://api.github.com/repos/est31/toml-rs/contributors","subscribers_url":"https://api.github.com/repos/est31/toml-rs/subscribers","subscription_url":"https://api.github.com/repos/est31/toml-rs/subscription","commits_url":"https://api.github.com/repos/est31/toml-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/est31/toml-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/est31/toml-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/est31/toml-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/est31/toml-rs/contents/{+path}","compare_url":"https://api.github.com/repos/est31/toml-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/est31/toml-rs/merges","archive_url":"https://api.github.com/repos/est31/toml-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/est31/toml-rs/downloads","issues_url":"https://api.github.com/repos/est31/toml-rs/issues{/number}","pulls_url":"https://api.github.com/repos/est31/toml-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/est31/toml-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/est31/toml-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/est31/toml-rs/labels{/name}","releases_url":"https://api.github.com/repos/est31/toml-rs/releases{/id}","deployments_url":"https://api.github.com/repos/est31/toml-rs/deployments","created_at":"2019-08-23T06:42:28Z","updated_at":"2019-08-23T06:42:30Z","pushed_at":"2019-10-28T14:50:43Z","git_url":"git://github.com/est31/toml-rs.git","ssh_url":"git@github.com:est31/toml-rs.git","clone_url":"https://github.com/est31/toml-rs.git","svn_url":"https://github.com/est31/toml-rs","homepage":"https://docs.rs/toml","size":1891,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alexcrichton:master","ref":"master","sha":"ec21d604f892a06999a9d38d38c903e083ad1f08","user":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"repo":{"id":21056223,"node_id":"MDEwOlJlcG9zaXRvcnkyMTA1NjIyMw==","name":"toml-rs","full_name":"alexcrichton/toml-rs","private":false,"owner":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"html_url":"https://github.com/alexcrichton/toml-rs","description":"A TOML encoding/decoding library for Rust","fork":false,"url":"https://api.github.com/repos/alexcrichton/toml-rs","forks_url":"https://api.github.com/repos/alexcrichton/toml-rs/forks","keys_url":"https://api.github.com/repos/alexcrichton/toml-rs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexcrichton/toml-rs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexcrichton/toml-rs/teams","hooks_url":"https://api.github.com/repos/alexcrichton/toml-rs/hooks","issue_events_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/events{/number}","events_url":"https://api.github.com/repos/alexcrichton/toml-rs/events","assignees_url":"https://api.github.com/repos/alexcrichton/toml-rs/assignees{/user}","branches_url":"https://api.github.com/repos/alexcrichton/toml-rs/branches{/branch}","tags_url":"https://api.github.com/repos/alexcrichton/toml-rs/tags","blobs_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexcrichton/toml-rs/statuses/{sha}","languages_url":"https://api.github.com/repos/alexcrichton/toml-rs/languages","stargazers_url":"https://api.github.com/repos/alexcrichton/toml-rs/stargazers","contributors_url":"https://api.github.com/repos/alexcrichton/toml-rs/contributors","subscribers_url":"https://api.github.com/repos/alexcrichton/toml-rs/subscribers","subscription_url":"https://api.github.com/repos/alexcrichton/toml-rs/subscription","commits_url":"https://api.github.com/repos/alexcrichton/toml-rs/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexcrichton/toml-rs/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexcrichton/toml-rs/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexcrichton/toml-rs/contents/{+path}","compare_url":"https://api.github.com/repos/alexcrichton/toml-rs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexcrichton/toml-rs/merges","archive_url":"https://api.github.com/repos/alexcrichton/toml-rs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexcrichton/toml-rs/downloads","issues_url":"https://api.github.com/repos/alexcrichton/toml-rs/issues{/number}","pulls_url":"https://api.github.com/repos/alexcrichton/toml-rs/pulls{/number}","milestones_url":"https://api.github.com/repos/alexcrichton/toml-rs/milestones{/number}","notifications_url":"https://api.github.com/repos/alexcrichton/toml-rs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexcrichton/toml-rs/labels{/name}","releases_url":"https://api.github.com/repos/alexcrichton/toml-rs/releases{/id}","deployments_url":"https://api.github.com/repos/alexcrichton/toml-rs/deployments","created_at":"2014-06-21T00:06:20Z","updated_at":"2019-10-28T14:01:26Z","pushed_at":"2019-10-28T15:05:14Z","git_url":"git://github.com/alexcrichton/toml-rs.git","ssh_url":"git@github.com:alexcrichton/toml-rs.git","clone_url":"https://github.com/alexcrichton/toml-rs.git","svn_url":"https://github.com/alexcrichton/toml-rs","homepage":"https://docs.rs/toml","size":1859,"stargazers_count":546,"watchers_count":546,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":118,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":42,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":118,"open_issues":42,"watchers":546,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/349"},"html":{"href":"https://github.com/alexcrichton/toml-rs/pull/349"},"issue":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/issues/349"},"comments":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/issues/349/comments"},"review_comments":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/349/comments"},"review_comment":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/pulls/349/commits"},"statuses":{"href":"https://api.github.com/repos/alexcrichton/toml-rs/statuses/37484d5c37c49cf4ec86c2a9d62fbb44915e5ece"}},"author_association":"CONTRIBUTOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"alexcrichton","id":64996,"node_id":"MDQ6VXNlcjY0OTk2","avatar_url":"https://avatars1.githubusercontent.com/u/64996?v=4","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"comments":0,"review_comments":1,"maintainer_can_modify":false,"commits":4,"additions":131,"deletions":18,"changed_files":2}}
{"actor":{"display_login":"alexcrichton"}}