Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6f46e6b9 authored by Josh Gao's avatar Josh Gao
Browse files

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
parent 4c936397
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment