From a89a279764265736ae38e29eca8df1478daf3cb0 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Sat, 28 Sep 2024 12:28:41 -0700 Subject: [PATCH] notmuch: use faster, but inaccurate message count --- notmuch/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notmuch/src/lib.rs b/notmuch/src/lib.rs index 2eb367d..0ffde83 100644 --- a/notmuch/src/lib.rs +++ b/notmuch/src/lib.rs @@ -518,8 +518,10 @@ impl Notmuch { } pub fn count(&self, query: &str) -> Result { - // TODO: compare speed of notmuch count for * w/ and w/o --output=threads - let res = self.run_notmuch(["count", "--output=threads", query])?; + // NOTE: --output=threads is technically more correct, but really slow + // TODO: find a fast thread count path + // let res = self.run_notmuch(["count", "--output=threads", query])?; + let res = self.run_notmuch(["count", query])?; // Strip '\n' from res. let s = std::str::from_utf8(&res[..res.len() - 1])?; Ok(s.parse()?)