mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Reword comments to remove explicit TODO
Keeping the comments in some degree is valuable, as it clarifies the time complexity of the operations done; in the event of a performance issue, this would likely be somewhere to look. However, remove the `TODO` string directly, as it is not an urgent look-at-me-now.
This commit is contained in:
parent
6fc68a82db
commit
ab8817eb9c
@ -186,9 +186,10 @@ func (p *SafeDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Change
|
||||
}
|
||||
}
|
||||
for _, endpoint := range changes.UpdateNew {
|
||||
// TODO: Find a more effient way of doing this.
|
||||
// Currently iterates over each zoneRecord in ZoneRecords for each Endpoint in UpdateNew; the same will go for
|
||||
// Delete. As it's double-iteration, that's O(n^2), which isn't great.
|
||||
// Currently iterates over each zoneRecord in ZoneRecords for each Endpoint
|
||||
// in UpdateNew; the same will go for Delete. As it's double-iteration,
|
||||
// that's O(n^2), which isn't great. No performance issues have been noted
|
||||
// thus far.
|
||||
var zoneRecord ZoneRecord
|
||||
for _, target := range endpoint.Targets {
|
||||
for _, zr := range zoneRecords {
|
||||
@ -219,7 +220,7 @@ func (p *SafeDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Change
|
||||
}
|
||||
}
|
||||
for _, endpoint := range changes.Delete {
|
||||
// TODO: Find a more effient way of doing this.
|
||||
// As above, currently iterates in O(n^2). May be a good start for optimisations.
|
||||
var zoneRecord ZoneRecord
|
||||
for _, zr := range zoneRecords {
|
||||
if zr.Name == endpoint.DNSName && string(zr.Type) == endpoint.RecordType {
|
||||
|
Loading…
Reference in New Issue
Block a user