Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
5.13.0
-
None
-
-
2c6dcc643f29c212fca0ead123a377e96b9a17c9 (qt/qtconnectivity/5.14)
Description
When performing a Low Energy only scan in an environment with 25+ BLE devices (like in development), a lot of RSSI changes are received from Bluez. In the QBluetoothDeviceDiscoveryAgentPrivate::_q_PropertiesChanged function, a OrgBluezDevice1Interface is instantiated every time and this is used to fetch properties from the device, with each property fetch leading to a blocking dbus call. This really makes the (qml) GUI really sluggish (I suspect because the _q_PropertiesChanged function is executed from the main event loop which also handles GUI interaction).
A solution would be to cache the property map as it is received in the QBluetoothDeviceDiscoveryAgentPrivate::_q_InterfacesAdded function, update the cache in the QBluetoothDeviceDiscoveryAgentPrivate::_q_PropertiesChanged function and create and update the QBluetoothDeviceInfo instances from that cache.