From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OIXyGB2bu2SMdAEASxT56A (envelope-from ) for ; Sat, 22 Jul 2023 11:02:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sKfpGB2bu2SSvwAA9RJhRA (envelope-from ) for ; Sat, 22 Jul 2023 11:02:21 +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 A69BB3D572 for ; Sat, 22 Jul 2023 11:02:20 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=oJhr6Adt; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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; dmarc=none ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690016540; 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=PtaUsaRUo1+uKpyTCUgbcJWzqSxY7Lw5IoTTk09Rfg8=; b=lle31yGCv5cUhyi9qvbimHf6KZfhaOe2GZiT5hQX1jlAOVigQcXRArCtutZWwHEfzrI6aX LFDjR1WBjmJkv8vyxP0Re0ttsO/kTZFak8wUbmj8MvHyBoAv3NBHYeIR0PrM4yY8jpDwkJ tNAScjFw3aPcOt7hF4kraTlldy1YVnj+DQ/i2hHC6mGJTb3HbtcsiM75S+G+o9fOgB463Z tYlvln8B9qXjpsICzzno2Wks5UUltXO6UywQf5Gl1+tD/KBbWbbUh9pFFLFQ3Ef0SRVr8Y 1y5qOqHpE+Hk3H0U85HCbgTNvEuLZ2PNU59RWIIJODZe4dApczhy7wX04W/uTg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1690016540; a=rsa-sha256; cv=fail; b=c2MpiVIXuhaTRyU9tblvdj8v1q4z/8SXxYDyMRwEowiQEzlv2EA5BfQ89CGDU4GdfgkbY1 CnnpZIcNDFDndxcn/u1c3G8X4iGEzNL0zi0ApS/xvbX6UDNbONwIHO54Gsycrckgriy+n6 jPOTXnYoZlW1Px2dhY15NZzz/ROufnIiZ4wXhp/rWCimxPwQXFm1QqPwRBm0bFllfAR7fb RDudEyNyRlr9VQiZH9oUhLLoRLv8WKZUY2a9dk1zawafkdKjQejshDW+iJoBRFKbRwgX1l RVgOC/PjgoDulWMjvOa86AwqZ/OxEcD1aTsXRH6dgblMWUhzI9fJqI/R5+afVA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=meesny header.b=oJhr6Adt; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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; dmarc=none Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3510C5F707; Sat, 22 Jul 2023 09:02:17 +0000 (UTC) Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) by mail.notmuchmail.org (Postfix) with ESMTPS id 887F85F6D7 for ; Sat, 22 Jul 2023 09:02:13 +0000 (UTC) Received: from c53 (gw1.nor.fi [185.218.193.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: too) by meesny.iki.fi (Postfix) with ESMTPSA id 4R7L5w0zLVzybj; Sat, 22 Jul 2023 12:02:11 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1690016532; 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: in-reply-to:in-reply-to:references:references; bh=LDFH9wUd17bCc9yJgQWTLwUMgN+G7FiS899/i7N/t74=; b=oJhr6Adt3W6o5Bg5YvBxTaiHT+dzOR57yKXS5sm6vLUDlAnT+++O6D6nSWj7FtHLxOjcKk +CJXLZ1pn+VFHLewhhnt0XxLANus5CdcF4e25QIpIrxSyBrIanb9e5ChJ0bqdUWUaiGz+b fxMi8FYbhpfuy87Djeu2zLd8JXLzWbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1690016532; 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: in-reply-to:in-reply-to:references:references; bh=LDFH9wUd17bCc9yJgQWTLwUMgN+G7FiS899/i7N/t74=; b=KWo/yO1fdfXQNKfEFmY6PMhS7sEnbo8yboQCKY2FC341+rx6nXW2EwY9tzgLFxzAyHwu+U igO7Se2C1wUTyfcMJYc6JAU9ws3gnUrKRVNrEyok9MnZDpy/bSd1eGanIDKSe5LBlSAMLk iSM2HbXs6VDm12jK+mp6Q2KhtpgTriM= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1690016532; a=rsa-sha256; cv=none; b=YUV92ZxVEyXhEo0D2G9tc5oQrKdLkUarlOya1tuxpBcTo73EseIGmG/BleFw2PaHe4z7KL 9nvOAg2ZCX5pcVBgfIRSyMGNpe6Rx1U/K+OTOUjPpJdwOZd8vKLrbOhIM2Op3blI8LayYs Qjm0t+cLdEp6sZKIaRK3SiHnIT/6P3s= From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: Speedup for deleting files In-Reply-To: <20230720120801.2215538-1-david@tethera.net> References: <20230720120801.2215538-1-david@tethera.net> User-Agent: Notmuch/0.37+27~gff8ef59 (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 Message-ID-Hash: M7L6ZNGLSPHOMEJUBP76LTYDXT6HKJZC X-Message-ID-Hash: M7L6ZNGLSPHOMEJUBP76LTYDXT6HKJZC X-MailFrom: tomi.ollila@iki.fi 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: ukleinek@debian.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-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.60 X-Spam-Score: -1.60 X-Migadu-Queue-Id: A69BB3D572 X-Migadu-Scanner: mx1.migadu.com X-TUID: 94vKYGVIivMs On Thu, Jul 20 2023, David Bremner wrote: > Thanks to discussion with Olly Betts and some perf runs, I realized > the current clean up of deleted files from the database is somewhat > wasteful since it modifies the message documents (by deleting the > filename) before in most cases deleting the whole record. While trying > this out, I triggered what seems to be a bug in existing notmuch; the > code checks for the existence of a certain Xapian term after deleting > the document. > > Compared to git master [1], cleaning up 50k of 200k messages now takes > about 44s versus 80. So not quite a 50% improvement, but not bad. I > would expect a larger relative improvement on larger databases. > > [1]: https://notmuchmail.org/perf-test-results/2023-07-18-minkowski/ Series LGTM. Tomi