Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map allocation optimization for client-go/tools/cache #70234

Merged
merged 1 commit into from
Oct 25, 2018
Merged

Map allocation optimization for client-go/tools/cache #70234

merged 1 commit into from
Oct 25, 2018

Conversation

Adirio
Copy link
Contributor

@Adirio Adirio commented Oct 25, 2018

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Pre-allocates 3 maps in different Replace methods that are being created from a slice, so the size is known beforehand.

Which issue(s) this PR fixes:
NONE

Special notes for your reviewer:
The optimization may be really small but it is good practice to pre-allocate in such cases.

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 25, 2018
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 25, 2018
@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 25, 2018
@Adirio
Copy link
Contributor Author

Adirio commented Oct 25, 2018

I requested the CLA to sign it but I did not receive the email. I asked for a resend but figured I would PR this trivial changes already so that it can be reviewed.

Initial allocation of several maps as the sizes are known

Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Oct 25, 2018
@Adirio Adirio changed the title Adirio patch 1 Map allocation optimization for client-go/tools/cache Oct 25, 2018
@Adirio
Copy link
Contributor Author

Adirio commented Oct 25, 2018

Edited the title, signed the CLA, squashed the 3 commits into 1 and signed it. Should be ready to merge now.

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Oct 25, 2018
@liggitt
Copy link
Member

liggitt commented Oct 25, 2018

/ok-to-test
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 25, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Adirio, liggitt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 25, 2018
@Adirio
Copy link
Contributor Author

Adirio commented Oct 25, 2018

Everything seems to be fine (expected on a trivial PR). What is the next step?

@liggitt
Copy link
Member

liggitt commented Oct 25, 2018

it's in the merge queue. the bots will take it from here. thanks!

@k8s-ci-robot k8s-ci-robot merged commit 12cf545 into kubernetes:master Oct 25, 2018
@Adirio Adirio deleted the Adirio-patch-1 branch October 26, 2018 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants