cloud-provider-azure icon indicating copy to clipboard operation
cloud-provider-azure copied to clipboard

Optimize CIDR aggregation to improve performance and reduce memory usage

Open zarvd opened this issue 1 year ago • 8 comments

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.:


zarvd avatar Oct 05 '24 11:10 zarvd

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 avatar Oct 05 '24 11:10 k8s-ci-robot

/ok-to-test

nilo19 avatar Oct 07 '24 23:10 nilo19

/retest

zarvd avatar Oct 10 '24 01:10 zarvd

/retest

zarvd avatar Oct 11 '24 06:10 zarvd

/retest

zarvd avatar Oct 18 '24 01:10 zarvd

/retest

zarvd avatar Oct 22 '24 01:10 zarvd

/retest

zarvd avatar Oct 24 '24 03:10 zarvd

Coverage Status

coverage: 76.793% (+0.06%) from 76.735% when pulling 0c90566433eb04d7863eacf315d934e5dc411e13 on zarvd:perf/cidr/aggregate into 103c1589d263e7d450e62d25f03f4fcdd40537b7 on kubernetes-sigs:master.

coveralls avatar Oct 25 '24 05:10 coveralls

/lgtm /approve

MartinForReal avatar Nov 20 '24 02:11 MartinForReal

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MartinForReal, zarvd

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 avatar Nov 20 '24 02:11 k8s-ci-robot

/lgtm

MartinForReal avatar Nov 20 '24 06:11 MartinForReal

/cherrypick release-1.31

MartinForReal avatar Nov 26 '24 02:11 MartinForReal

/cherrypick release-1.30

MartinForReal avatar Nov 26 '24 02:11 MartinForReal

/cherrypick release-1.29

MartinForReal avatar Nov 26 '24 02:11 MartinForReal

@MartinForReal: new pull request created: #7685

In response to this:

/cherrypick release-1.31

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.

@MartinForReal: new pull request created: #7686

In response to this:

/cherrypick release-1.30

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.

@MartinForReal: new pull request created: #7687

In response to this:

/cherrypick release-1.29

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.