From bef734553e1b1cc3be54906cfc11c8b8ba0c6f91 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 27 Oct 2022 02:53:38 +0800 Subject: [PATCH] clarify some comments and clean up debug messages --- apps/vault/src/actions.rs | 5 ++++- services/pddb/src/main.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/vault/src/actions.rs b/apps/vault/src/actions.rs index 54549663b..f58c9a97b 100644 --- a/apps/vault/src/actions.rs +++ b/apps/vault/src/actions.rs @@ -688,6 +688,7 @@ impl<'a> ActionManager<'a> { match self.pddb.borrow().read_dict(VAULT_PASSWORD_DICT, None, Some(256 * 1024)) { Ok(keys) => { let mut oom_keys = 0; + il.reserve(keys.len()); for key in keys { if let Some(data) = key.data { if let Some(pw) = storage::PasswordRecord::try_from(data).ok() { @@ -727,7 +728,9 @@ impl<'a> ActionManager<'a> { } }, } - /* + /* DELETEME: kept around for quick debugging without having to look through commit history + once we have confidence in the new method, we can drop this code right away. + #[cfg(feature="vaultperf")] self.perfentry(&self.pm, PERFMETA_STARTBLOCK, 1, std::line!()); let keylist = match self.pddb.borrow().list_keys(VAULT_PASSWORD_DICT, None) { diff --git a/services/pddb/src/main.rs b/services/pddb/src/main.rs index e06734598..2373ae88d 100644 --- a/services/pddb/src/main.rs +++ b/services/pddb/src/main.rs @@ -1578,7 +1578,7 @@ fn wrapped_main() -> ! { (_, buf) = sbuf.split_at_mut(len + pos); } SerializeResult::Failure(key_name) => { - log::info!("ran out of space filling buffer, pushing {} back into the queue", key_name); + log::debug!("ran out of space filling buffer, pushing {} back into the queue", key_name); // data didn't fit, quit with finished = false; state.key_list.push(key_name); break;