Source initialization requires (expensive) lookup for network interfaces
Closed this issue · 0 comments
fako1024 commented
Currently, setting up a new source triggers a call to net.InterfaceByName(<name>)
, which in turn calls a stack of methods to retrieve the current list of interfaces, leading to quite expensive syscall
invocations. While being ok(ish) for single instances and / or few static interfaces, in situations where a lot of interfaces and / or a large number of instabilities (causing repeated up / down and hence re-initialization actions) this can cause significant overhead in total.
DoD
- Assess options to minimize overhead (why is a deep call required to perform this lookup?)
- Remove complex lookup call upon interface initialization
-
At least provide an option to provide a (reusable)net.Interfaces
list upon initialization to reduce overhead when bulking