Bug #17387
Speed up Proxy::DHCP::SubnetService#find_subnet
Pull request:
Fixed in Releases:
Found in Releases:
Description
Current implementation is O(n), it can be made O(log n).
Related issues
Associated revisions
History
#1
Updated by Dmitri Dolguikh almost 6 years ago
- Related to Bug #17373: ISC dhcp provider is unable to handle very big networks added
#2
Updated by The Foreman Bot almost 6 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/476 added
#3
Updated by The Foreman Bot over 5 years ago
- Pull request https://github.com/theforeman/smart-proxy/pull/477 added
#4
Updated by Dominic Cleal over 5 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset c16b176dd1e258188e7bc158247b3319c80e6576.
#5
Updated by Dominic Cleal over 5 years ago
- Assignee changed from Dmitri Dolguikh to Dominic Cleal
- Legacy Backlogs Release (now unused) set to 203
fixes #17387 - SubnetService#find_subnet has constant time lookup
find_subnet is now approximately constant with the number of subnets
configured, using hash lookups of possible network prefixes for the
given IP address until the most specific prefix is found. Benchmark
results:
add_subnet only checks for an identical network prefix instead of
overlapping prefixes with #find_subnet, speeding it up considerably.
Benchmark results: