From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GFOZLb7ayWIduAAAbAwnHQ (envelope-from ) for ; Sat, 09 Jul 2022 21:45:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6Jd6Lb7ayWINoAAAauVa8A (envelope-from ) for ; Sat, 09 Jul 2022 21:45:02 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 8032C3D72F for ; Sat, 9 Jul 2022 21:45:02 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2371F5F6C5; Sat, 9 Jul 2022 19:35:36 +0000 (UTC) Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by mail.notmuchmail.org (Postfix) with ESMTPS id 2F5335F42C for ; Sat, 9 Jul 2022 19:35:34 +0000 (UTC) Received: by mail-io1-xd31.google.com with SMTP id u6so1586365iop.5 for ; Sat, 09 Jul 2022 12:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9cRYeSGDmni7ulnHUrft0huhA6nBaqrmIS+ESDOMdGY=; b=lSSJaBWQwoUUyuptEDfSYcHmb52l18IfqvJuhjOWnLEK495mHmsI96XWdHX9g0tYsj wSM9p1VIvHavwY66ZTv9ntyNDbBO/ICrRJbY+E3bM5XqPmO1BErUl9USoMaSeNqfReL8 osyhvU5vlWlqpCB4ITkZjRKVPZt9+a169/gF4A+yZAt/kZk0cdqaDdzyldMvkg3UQR60 M5VNbkUD8yOf3rONq3ewGTHZvGRYv6VliB0wt1r2S0yq5pq5UHQ8ULpXiFgW3KDJylZN kVPbvh999Sv079cg8W2Wr6adxN5k98RKnC5EytQ7EW3A+uhA81J5ZCV+3C+JeOtl/h9S APew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9cRYeSGDmni7ulnHUrft0huhA6nBaqrmIS+ESDOMdGY=; b=ToUVBd1biIOlfn9Qcg6w4leyiTBQ/A/iMtqaQen+7hoY20u4oVTirQenqScVH6seZO C+s3o+p9oBHfrE0hD7KZlDlE9ytUJUnVVmPyVmdulRPRRS++siQW82/ufMIWPtn9+tVD qhj8h3v16NtgZ+IMVl9e9hVSdKhm3TAjOCSc90VufWVY8U0B9K2Hfg3tvSLyYAsYrYjG 5UBWUvjBPBy+FUGXbwMRdmh1UL/dD+oPvqzv0YV77f/3yW9Un0u2ewNNjctrbwN07+Ss oXTfu9jsSdQfZ0XLiYbl0o1EICARqSlv/bt3/ntI8DsnAbtR40S6R5iuB1z4sMujwzxT oiaw== X-Gm-Message-State: AJIora9peP8Cz39u2DSadsvZY7g46Foi0Rc5lyw7WRKJF8LCSwTRKKkr aUo3inJJkRvps7wGrPcas4Tup1Ht3GT/oAC+uvsBvuXtqRQ= X-Google-Smtp-Source: AGRyM1vYluic+152ULd2FbvC76Cs2BT/4gsGXqGz0r5ODRK6GKZvmtuIjI92+yEGLgE/J7VOx4vY9D2JkORUIsGiqO4= X-Received: by 2002:a6b:691d:0:b0:679:269a:c7da with SMTP id e29-20020a6b691d000000b00679269ac7damr5297601ioc.92.1657395332682; Sat, 09 Jul 2022 12:35:32 -0700 (PDT) MIME-Version: 1.0 References: <20220703151103.1800726-1-david@tethera.net> <20220703151103.1800726-5-david@tethera.net> <877d4oykuy.fsf@tethera.net> In-Reply-To: <877d4oykuy.fsf@tethera.net> From: Michael J Gruber Date: Sat, 9 Jul 2022 21:35:21 +0200 Message-ID: Subject: Re: [PATCH 4/4] CLI/git: replace calls to notmuch-search with database access To: David Bremner Message-ID-Hash: K6RMO562EW6BZYYVIFN6FTFPEU2BZ6NP X-Message-ID-Hash: K6RMO562EW6BZYYVIFN6FTFPEU2BZ6NP X-MailFrom: michaeljgruber@gmail.com 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 CC: Tomi Ollila , notmuch@notmuchmail.org 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=1657395902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc: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:dkim-signature; bh=Z9DSF6hqB9lKJfifQnAA4drqMQnro7fDwq0KwMUaFek=; b=I3Wg3axmwqDu01rAZzo+5CaqSwd3XBOWxwVuRKahQf3gubDdJkzXowPHxMoUTLFBr78gbB n8bL5701NyePaTZ/F1H2XloRSXHX1qmXgIs4eXrkAwsYTw0rf02C3zTLfhgvue+vlZHp4Y 5kagzK0Y9wUOa1G5nQMPT4JRUMw6Z0wwn5kTAvh47G17wUXC7vA7mFAW/n/E+L0p7JRSni 0iYhBWHFQu52CoI4YqXI1sn7ksxB2EujSjWdMyalcx7DVqv4Unyp2vxGPb0XLAsSF7WSoW tkS/BO/BE5jbWrikEetVHokqt0geGWd7RM8T+KzEn0EW8BkOatQzVuIIInEvDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657395902; a=rsa-sha256; cv=none; b=RBmf23qP6HhYJlpDe2w9+sUraDH8lvmt5RWjiMHr9lrRCVyve/JTMxO9ukTzyuVZ3VKFHI gDE9mfsVgSYrCYR7Hnhqm+y8deSP/I286+T5pNONn0ua7QvJYRLDZjiE+W5CYeCdNOL65S opIGiV/aWZC6YNdCbRMqJRaD790sU5Ci8b0Hh1C9vpMVLfJnblwE4sfH93Q61GHz8u4rCW IU6IdWIgL5chB7F2aX/AEKZdkJ5xAnIQ/o7RhXPUi3TknS7ZcuqpXaSKvnQLk5wBGy3rf2 /HK3RNTYMV1AX3P+aDXd4s6zSp1TQvTYSJrUQ4zVwyO33a3E+54Qm2gIZZaS/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=lSSJaBWQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 6.81 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=lSSJaBWQ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 8032C3D72F X-Spam-Score: 6.81 X-Migadu-Scanner: scn1.migadu.com X-TUID: CtgImXokJpNZ Am Do., 7. Juli 2022 um 17:59 Uhr schrieb David Bremner : > > 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 When I first saw that `notmuch-git` is implemented in python and calls out to `notmuch search` I wondered: Why doesn't it use the python bindings? I don't think "building the project partially and installing by copying parts somewhere" is a use case that the design implementation has to cater for, especially if this incurs performance penalties. Scripting around `notmuch dump` does not make things better. I do understand that you want lean dependencies server side, but having python there isn't really uncommon, is it? If building and installing from git via `make install` is too much of a hassle we should probably work on reducing the hassle ;) Cheers Michael