diff options
author | Mike Yu <yumike@google.com> | 2022-01-06 21:13:06 +0800 |
---|---|---|
committer | Mike Yu <yumike@google.com> | 2022-01-11 01:50:38 +0000 |
commit | 5d50b4983a114775485a059997604bb9ab97e68e (patch) | |
tree | a2e6eb87c0bcfb3fbb37a755b3cecb2a4d99a57c /doh | |
parent | 42a735327fcf9773e25dca0e4ab86de02cb7eb00 (diff) | |
download | DnsResolver-5d50b4983a114775485a059997604bb9ab97e68e.tar.gz |
DoH: Reduce DOH_THREADS from 2 to 1
Make the doh engine to run on one single thread. This change
doesn't seem to improve DoH query latency, but it does save
some CPU resource. See the bug for the test result.
Bug: 213438941
Test: cd packages/modules/DnsResolver && atest
Change-Id: I9c33e10d9269ba14c9ce708d0bc4b3761f908dea
Diffstat (limited to 'doh')
-rw-r--r-- | doh/dispatcher/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doh/dispatcher/mod.rs b/doh/dispatcher/mod.rs index 66e2f3d5..b63f97fb 100644 --- a/doh/dispatcher/mod.rs +++ b/doh/dispatcher/mod.rs @@ -76,7 +76,7 @@ pub struct Dispatcher { } impl Dispatcher { - const DOH_THREADS: usize = 2; + const DOH_THREADS: usize = 1; pub fn new(validation: ValidationReporter, tagger: SocketTagger) -> Result<Dispatcher> { let (cmd_sender, cmd_receiver) = mpsc::channel::<Command>(MAX_BUFFERED_CMD_COUNT); |