{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/86706","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/86706/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/86706/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/86706/events","html_url":"https://github.com/kubernetes/kubernetes/pull/86706","id":543612354,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU3ODc2Nzc2","number":86706,"title":"Use map to represent defaultGroupVersions","user":{"login":"tedyu","id":235188,"node_id":"MDQ6VXNlcjIzNTE4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/235188?v=4","gravatar_id":"","url":"https://api.github.com/users/tedyu","html_url":"https://github.com/tedyu","followers_url":"https://api.github.com/users/tedyu/followers","following_url":"https://api.github.com/users/tedyu/following{/other_user}","gists_url":"https://api.github.com/users/tedyu/gists{/gist_id}","starred_url":"https://api.github.com/users/tedyu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedyu/subscriptions","organizations_url":"https://api.github.com/users/tedyu/orgs","repos_url":"https://api.github.com/users/tedyu/repos","events_url":"https://api.github.com/users/tedyu/events{/privacy}","received_events_url":"https://api.github.com/users/tedyu/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"node_id":"MDU6TGFiZWw0NzczOTcwODY=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false,"description":"Indicates the PR's author has signed the CNCF CLA."},{"id":122775691,"node_id":"MDU6TGFiZWwxMjI3NzU2OTE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/cleanup","name":"kind/cleanup","color":"c7def8","default":false,"description":"Categorizes issue or PR as related to cleaning up code, process, or technical debt."},{"id":114528273,"node_id":"MDU6TGFiZWwxMTQ1MjgyNzM=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/backlog","name":"priority/backlog","color":"fbca04","default":false,"description":"Higher priority than priority/awaiting-more-evidence."},{"id":349530249,"node_id":"MDU6TGFiZWwzNDk1MzAyNDk=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false,"description":"Denotes a PR that doesn't merit a release note."},{"id":173493835,"node_id":"MDU6TGFiZWwxNzM0OTM4MzU=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/api-machinery","name":"sig/api-machinery","color":"d2b48c","default":false,"description":"Categorizes an issue or PR as relevant to sig-api-machinery."},{"id":253450934,"node_id":"MDU6TGFiZWwyNTM0NTA5MzQ=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/M","name":"size/M","color":"eebb00","default":false,"description":"Denotes a PR that changes 30-99 lines, ignoring generated files."}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-12-29T23:04:39Z","updated_at":"2020-01-02T21:24:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/86706","html_url":"https://github.com/kubernetes/kubernetes/pull/86706","diff_url":"https://github.com/kubernetes/kubernetes/pull/86706.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/86706.patch"},"body":"**What type of PR is this?**\r\n/kind cleanup\r\n\r\n**What this PR does / why we need it**:\r\nFor restmapper, currently defaultGroupVersions is expressed in slice.\r\nThis is not efficient for sorting.\r\n\r\nThis PR changes defaultGroupVersions to map where value is the ordinal from the input default GroupVersion.\r\nDuring comparison for sorting, linear lookup is replaced with O(1) lookup.\r\nAlso made the short circuit case for rhsIndex prominent.\r\n\r\nMemory consumption is on par with current formation.\r\n\r\n**Which issue(s) this PR fixes**:\r\nFixes #\r\n\r\n```release-note\r\nNONE\r\n```\r\n\r\n**Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.**:\r\n\r\n```docs\r\n\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/570355756","html_url":"https://github.com/kubernetes/kubernetes/pull/86706#issuecomment-570355756","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/86706","id":570355756,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MDM1NTc1Ng==","user":{"login":"liggitt","id":980082,"node_id":"MDQ6VXNlcjk4MDA4Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/980082?v=4","gravatar_id":"","url":"https://api.github.com/users/liggitt","html_url":"https://github.com/liggitt","followers_url":"https://api.github.com/users/liggitt/followers","following_url":"https://api.github.com/users/liggitt/following{/other_user}","gists_url":"https://api.github.com/users/liggitt/gists{/gist_id}","starred_url":"https://api.github.com/users/liggitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liggitt/subscriptions","organizations_url":"https://api.github.com/users/liggitt/orgs","repos_url":"https://api.github.com/users/liggitt/repos","events_url":"https://api.github.com/users/liggitt/events{/privacy}","received_events_url":"https://api.github.com/users/liggitt/received_events","type":"User","site_admin":false},"created_at":"2020-01-02T21:24:32Z","updated_at":"2020-01-02T21:24:32Z","author_association":"MEMBER","body":"/assign @deads2k \r\nto verify this is equivalent\r\n\r\nplease demonstrate the need for this improvement with a benchmark at typical API group counts"}}
{"actor":{"display_login":"liggitt"}}