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

Optimize CIDR aggregation to improve performance and reduce memory usage #7201

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zarvd
Copy link
Contributor

@zarvd zarvd commented Oct 5, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Optimize CIDR aggregation to improve performance and reduce memory usage

go test -bench . -benchmem

goos: darwin
goarch: arm64
pkg: sigs.k8s.io/cloud-provider-azure/pkg/provider/loadbalancer/iputil
cpu: Apple M1 Max
BenchmarkAggregatePrefixes-10                        290           4031636 ns/op        11123568 B/op         39 allocs/op
BenchmarkAggregatePrefixesWithPrefixTree-10           98          12106605 ns/op        19511091 B/op     131121 allocs/op

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Optimize CIDR aggregation to improve performance and reduce memory usage

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Oct 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zarvd
Once this PR has been reviewed and has the lgtm label, please assign martinforreal for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 5, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @zarvd. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 5, 2024
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 5, 2024
@zarvd zarvd changed the title Optimize CIDR aggregation in NetworkSecurityGroup for enhanced performance Optimize CIDR aggregation to improve performance and reduce memory usage Oct 5, 2024
@nilo19
Copy link
Contributor

nilo19 commented Oct 7, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 7, 2024
@zarvd zarvd force-pushed the perf/cidr/aggregate branch 3 times, most recently from 5c25344 to 312fa1d Compare October 9, 2024 23:35
@zarvd
Copy link
Contributor Author

zarvd commented Oct 10, 2024

/retest

@zarvd zarvd force-pushed the perf/cidr/aggregate branch 2 times, most recently from 3db2a80 to 50bb0ca Compare October 11, 2024 02:15
@zarvd
Copy link
Contributor Author

zarvd commented Oct 11, 2024

/retest

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 11, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 14, 2024
@zarvd
Copy link
Contributor Author

zarvd commented Oct 18, 2024

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants