openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[network] Possible performance improvement for `performArpPing` #16262

Open lsiepel opened 8 months ago

lsiepel commented 8 months ago

Another issue with the current iOS wake up implementation is that it is part of performArpPing which is executed for every network interface. So it is executed many times if you don't restrict the number of network interfaces (#16145).

Originally posted by @wborn in https://github.com/openhab/openhab-addons/issues/9575#issuecomment-1888790785

wborn commented 8 months ago

If iOS wake up is configured it could be put into its own CompletableFuture and after it completes the arping commands could be exectued, e.g. using thenRunAsync

lsiepel commented 2 weeks ago

Was briefly looking into this. I doubt there will be any benefit.

The wakeUpIOS is strictly tied to the performArpPing, e.g. it is a pre-requisite for the following nativeArpPing.

As this check is conditionally if (iosDevice) and the interfaces can be restricted. I have a hard time to see where there are optimisations left. wdyt?