{"action":"opened","number":31,"pull_request":{"url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/31","id":58168568,"html_url":"https://github.com/mapzen/mapbox-vector-tile/pull/31","diff_url":"https://github.com/mapzen/mapbox-vector-tile/pull/31.diff","patch_url":"https://github.com/mapzen/mapbox-vector-tile/pull/31.patch","issue_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/31","number":31,"state":"open","locked":false,"title":"Simplify key/val attribute handling","user":{"login":"rmarianski","id":53770,"avatar_url":"https://avatars.githubusercontent.com/u/53770?v=3","gravatar_id":"","url":"https://api.github.com/users/rmarianski","html_url":"https://github.com/rmarianski","followers_url":"https://api.github.com/users/rmarianski/followers","following_url":"https://api.github.com/users/rmarianski/following{/other_user}","gists_url":"https://api.github.com/users/rmarianski/gists{/gist_id}","starred_url":"https://api.github.com/users/rmarianski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmarianski/subscriptions","organizations_url":"https://api.github.com/users/rmarianski/orgs","repos_url":"https://api.github.com/users/rmarianski/repos","events_url":"https://api.github.com/users/rmarianski/events{/privacy}","received_events_url":"https://api.github.com/users/rmarianski/received_events","type":"User","site_admin":false},"body":"Since we're iterating through keys in the dictionary, we won't have\nduplicates anyway, so there's no need to check. And because that was the\nonly reason for maintaining that state, a counter should suffice here.\n\nSomewhat similarly for values, we don't need to keep track of the values\nnow, because we have a dictionary for the lookups. And a counter will\nalso suffice here because only the length was used.\n\n@zerebubuth could you review please?\n\n@loicgasser would you be able to run that same test that you ran for https://github.com/mapzen/mapbox-vector-tile/pull/30 to see if we got even faster?","created_at":"2016-02-03T17:08:20Z","updated_at":"2016-02-03T17:08:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/31/commits","review_comments_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/31/comments","review_comment_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/31/comments","statuses_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/statuses/082807474f3563e174094f2b37e73d4c09c18768","head":{"label":"mapzen:simplify-attr-handling-further","ref":"simplify-attr-handling-further","sha":"082807474f3563e174094f2b37e73d4c09c18768","user":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"repo":{"id":26827282,"name":"mapbox-vector-tile","full_name":"mapzen/mapbox-vector-tile","owner":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapzen/mapbox-vector-tile","description":"Python package for encoding & decoding Mapbox Vector Tiles","fork":false,"url":"https://api.github.com/repos/mapzen/mapbox-vector-tile","forks_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/forks","keys_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/teams","hooks_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/hooks","issue_events_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/events{/number}","events_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/events","assignees_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/assignees{/user}","branches_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/branches{/branch}","tags_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/tags","blobs_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/statuses/{sha}","languages_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/languages","stargazers_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/stargazers","contributors_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/contributors","subscribers_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/subscribers","subscription_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/subscription","commits_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/contents/{+path}","compare_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/merges","archive_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/downloads","issues_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues{/number}","pulls_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls{/number}","milestones_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/milestones{/number}","notifications_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/labels{/name}","releases_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/releases{/id}","deployments_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/deployments","created_at":"2014-11-18T19:57:49Z","updated_at":"2016-02-02T13:30:14Z","pushed_at":"2016-02-03T17:07:08Z","git_url":"git://github.com/mapzen/mapbox-vector-tile.git","ssh_url":"git@github.com:mapzen/mapbox-vector-tile.git","clone_url":"https://github.com/mapzen/mapbox-vector-tile.git","svn_url":"https://github.com/mapzen/mapbox-vector-tile","homepage":"","size":152,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":24,"default_branch":"master"}},"base":{"label":"mapzen:master","ref":"master","sha":"ecdbe2ef16ca99014ac4f18c4130e75af5b6a601","user":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"repo":{"id":26827282,"name":"mapbox-vector-tile","full_name":"mapzen/mapbox-vector-tile","owner":{"login":"mapzen","id":5435747,"avatar_url":"https://avatars.githubusercontent.com/u/5435747?v=3","gravatar_id":"","url":"https://api.github.com/users/mapzen","html_url":"https://github.com/mapzen","followers_url":"https://api.github.com/users/mapzen/followers","following_url":"https://api.github.com/users/mapzen/following{/other_user}","gists_url":"https://api.github.com/users/mapzen/gists{/gist_id}","starred_url":"https://api.github.com/users/mapzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mapzen/subscriptions","organizations_url":"https://api.github.com/users/mapzen/orgs","repos_url":"https://api.github.com/users/mapzen/repos","events_url":"https://api.github.com/users/mapzen/events{/privacy}","received_events_url":"https://api.github.com/users/mapzen/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mapzen/mapbox-vector-tile","description":"Python package for encoding & decoding Mapbox Vector Tiles","fork":false,"url":"https://api.github.com/repos/mapzen/mapbox-vector-tile","forks_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/forks","keys_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/teams","hooks_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/hooks","issue_events_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/events{/number}","events_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/events","assignees_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/assignees{/user}","branches_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/branches{/branch}","tags_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/tags","blobs_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/refs{/sha}","trees_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/statuses/{sha}","languages_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/languages","stargazers_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/stargazers","contributors_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/contributors","subscribers_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/subscribers","subscription_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/subscription","commits_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/commits{/sha}","git_commits_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/git/commits{/sha}","comments_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/comments{/number}","issue_comment_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/comments{/number}","contents_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/contents/{+path}","compare_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/merges","archive_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/downloads","issues_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues{/number}","pulls_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls{/number}","milestones_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/milestones{/number}","notifications_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/labels{/name}","releases_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/releases{/id}","deployments_url":"https://api.github.com/repos/mapzen/mapbox-vector-tile/deployments","created_at":"2014-11-18T19:57:49Z","updated_at":"2016-02-02T13:30:14Z","pushed_at":"2016-02-03T17:07:08Z","git_url":"git://github.com/mapzen/mapbox-vector-tile.git","ssh_url":"git@github.com:mapzen/mapbox-vector-tile.git","clone_url":"https://github.com/mapzen/mapbox-vector-tile.git","svn_url":"https://github.com/mapzen/mapbox-vector-tile","homepage":"","size":152,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/31"},"html":{"href":"https://github.com/mapzen/mapbox-vector-tile/pull/31"},"issue":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/31"},"comments":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/mapzen/mapbox-vector-tile/statuses/082807474f3563e174094f2b37e73d4c09c18768"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":14,"deletions":11,"changed_files":1}}