Downsides:
- Add some additional overhead to manage the index
- The NMPCacheId struct grows to 16 bytes, affecting hashing performance for all object types.
Still do it, based on the assumption that it doesn't matter for a low number of interfaces. But the O(1) access time matters when having lots of interfaces.
ad1d74d platform: add index for links by ifname
src/platform/nmp-object.c | 47 +++++++++++++++++++++++++++++++++++++++++++--
src/platform/nmp-object.h | 9 +++++++++
2 files changed, 54 insertions(+), 2 deletions(-)
Upstream: cgit.freedesktop.org