Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 504
    • Issues 504
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 52
    • Merge requests 52
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #2401

Closed
Open
Created May 10, 2022 by Andrei Pavel@andrei🐧Maintainer

use a lookup-friendly structure when parsing relay addresses for better performance

For storing relay IP addresses that look like this:

{
    "Dhcp4": {
        "shared-networks": [
            {
                // List of IPv4 relay addresses for which this shared
                // network is selected.
                "relay": {
                    "ip-addresses": [
                        "192.168.56.1",
                        "192.168.56.2"
                    ]
                }
            }
        ]
    }
}

, a typedef std::vector<isc::asiolink::IOAddress> IOAddressList; is used.

It could be a std::unordered_set<isc::asiolink::IOAddress> for better performance. We treat it like a set in every regard. We look up addresses in it. If it contains a duplicate, it throws.

Here's a call graph that shows what percentage addAddress and containsAddress take out of parsing some shared networks with 114 subnets and 32 relay addresses.

relay-parser-call-graph

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking