The old code loops over all sensors and lights until one is found which needs to be queried. With more DDFs this code uses more CPU since almost nothing is to be done here. The PR skips some parts for DDF devices and also breaks up the loops to only process max. 5 sensors and 5 lights at a time, so it scales independent of network size.
The old code loops over all sensors and lights until one is found which needs to be queried. With more DDFs this code uses more CPU since almost nothing is to be done here. The PR skips some parts for DDF devices and also breaks up the loops to only process max. 5 sensors and 5 lights at a time, so it scales independent of network size.