Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
None
-
5.1.1, 5.2.0 Beta1
-
None
-
OS X 10.9
Description
For starters, I'm not 100% sure if the behaviour I'm seeing stems from Qt, but based on the reading I've done on QNetworkConfigurationManager and the Bearing API I think this is a good place to start.
Our application has a real-time audio component. Every 30s or so the packets from the audio server are delayed heavily for 2-3 seconds and then things calm back down. I noticed that the same effect could be produced by clicking on the wireless icon on the OS X menubar and forcing a wireless network scan.
While running the app 'interface' and looking at the console I noticed that the audio delay is introduced exactly when interface requests a 'Broadcast scan' after the 'IO80211ScanManager' purges its cache. This is what the console looks like.
11/5/2013 6:39:22.000 PM kernel[0] IO80211ScanManager::cachePurge: clearEntries[0] Firing! 11/5/2013 6:39:22.000 PM kernel[0] IO80211ScanManager:cachePurge: Found stale scan request 11/5/2013 6:39:22.000 PM kernel[0] IO80211ScanManager::cachePurge: NOT Rescheduling. 11/5/2013 6:43:48.000 PM kernel[0] IO80211ScanManager::startScan: Broadcast scan request received from 'interface' (pid 14929) (). 11/5/2013 6:43:48.000 PM kernel[0] IO80211ScanManager::startScan: Initiating scan. 11/5/2013 6:43:51.000 PM kernel[0] IO80211ScanManager::scanDone: Scheduling cache purge timer in 30 seconds. 11/5/2013 6:43:51.000 PM kernel[0] IO80211ScanManager::startScan: Broadcast scan request received from 'locationd' (pid 65) (). 11/5/2013 6:43:51.000 PM kernel[0] IO80211ScanManager::getScanResult: All scan results returned for 'interface' (pid 14929). 11/5/2013 6:43:51.000 PM kernel[0] IO80211ScanManager::getScanResult: All scan results returned for 'locationd' (pid 65).
So, is Qt as part of our QCoreApplication instance performing scans of nearby wireless networks as part of the Bearer API? That is what I believe to happening. I've confirmed via the debugger that there is a 'Qt Bearer Thread' spawned off every time we run the application. If that is the case, is there no way to disable network access monitoring? For now it would suffice to use whatever the machine is reporting as the active interface and then not continue scanning while the application is running.