From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6MiNJe0Cx2L0WgEAbAwnHQ (envelope-from ) for ; Thu, 07 Jul 2022 17:59:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CKyKJe0Cx2LVSQEA9RJhRA (envelope-from ) for ; Thu, 07 Jul 2022 17:59:41 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6E7EC2E120 for ; Thu, 7 Jul 2022 17:59:41 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 8D7A35E545; Thu, 7 Jul 2022 15:59:38 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 9D7435DD92 for ; Thu, 7 Jul 2022 15:59:35 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id EEF795FBD0; Thu, 7 Jul 2022 11:59:33 -0400 (EDT) Received: (nullmailer pid 1014471 invoked by uid 1000); Thu, 07 Jul 2022 15:59:33 -0000 From: David Bremner To: Tomi Ollila , notmuch@notmuchmail.org Subject: Re: [PATCH 4/4] CLI/git: replace calls to notmuch-search with database access In-Reply-To: References: <20220703151103.1800726-1-david@tethera.net> <20220703151103.1800726-5-david@tethera.net> Date: Thu, 07 Jul 2022 12:59:33 -0300 Message-ID: <877d4oykuy.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: ZM5SMTAAXU6QKKF5ITKMMLGSKO272IHN X-Message-ID-Hash: ZM5SMTAAXU6QKKF5ITKMMLGSKO272IHN X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657209581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=Y1tJzzRXLPh2HSzi156A/tfFpP0oOWEOUnPo1L9hs2A=; b=FoU2uY+uBNnFQXbg4Rj38m9B2A/+r/fFBwMieszrIL+ws7QfFD8rJPetM7uC3MXMHT9aII oBftNbPf9oWvhBrqDFQnFENgdvD+qp1o6FnKQ9qmYGZ2+LmFJGLU5ZpuZ/pJ1gnKtsNJNq CWzWPdMH+Ao+bUM5a3blgr426SD8RPTPzILWlKfXrbMIaO+7yuP7rv1Dm9o7WB8hayJ1jS 5tsSayICt/R9ld/jxt8pDq57S3/j62+FwmzGdchtadxc80qOkuyP9DaEst/cZc1Js2+q+C y+rNKrPEvFGLsAFrFksXvenNjqKBb34gkTvwIaKbBDqTIvyGK3JhN12XqI4GwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657209581; a=rsa-sha256; cv=none; b=IL+VM2T5ohoN2VcofPaWcXFc6u+fc/ZFyTMXTVQMlog7tZuPOnaRM0WaUHssmLbMGdUorS vwJe2IX/F2HUbr+zJZV0aerP/0Ae8n48+A7ALcRzb40G1RA0i7jWqOMR1rChpFaBvn0bfa g3G/Kk19BKBD/yqyr+sWR12g9kL2BvxyChCxXzp3b1WpmLCf5XrKcu+vCLWzrQPy5efoWW EKTuasyg6dl8bQTws3zOjOQwvfhoACUoWf81eYUO8mDDYKWdH3zsfg67e+Fn2ug+V/SHXx 6DjkqhCEgsNbKX5LOF1+a/oIKImM1HDmJf1YQYMDeHkN6KLa5c4pX/9KSf1Ieg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -2.44 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 6E7EC2E120 X-Spam-Score: -2.44 X-Migadu-Scanner: scn1.migadu.com X-TUID: 7APaU6nwhq3S Tomi Ollila writes: > On Sun, Jul 03 2022, David Bremner wrote: > > I've trying to think if there were a way to somehow run only one notmuch > command instead of notmuch search on all maeby-deleted files -- or > alternatively attempt to load python bindings and in case of failure use > the notmuch-search methid... > We could run one notmuch-dump command to get a list of the message-ids in the database, and build a dictionary in memory. Might be a bit slow? Here it would take 10-15s just do the dump. But certainly faster than 500K execs of notmuch search