adb: initialize mDNS asynchronously.
Use fdevent_run_on_main_thread to initialize mDNS in a thread and register an fdevent from the main thread upon success. This reduces the startup time of `adb server` by ~3 seconds when mDNS can't be successfully started. With an already running adb server, `time adb server nodaemon` goes from: adb server nodaemon 0.00s user 0.16s system 4% cpu 3.817 total to: adb server nodaemon 0.00s user 0.01s system 1% cpu 0.665 total Bug: http://b/37869663 Test: `adb server nodaemon` with an existing adb server Change-Id: Ia5a1a2a138610f3bf6792400050ca68f95ae3734
Loading
Please register or sign in to comment