unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: ukleinek@debian.org
Subject: Speedup for deleting files
Date: Thu, 20 Jul 2023 09:07:59 -0300	[thread overview]
Message-ID: <20230720120801.2215538-1-david@tethera.net> (raw)

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/

             reply	other threads:[~2023-07-20 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-20 12:07 David Bremner [this message]
2023-07-20 12:08 ` [PATCH 1/2] lib/message: check message type before deleting document David Bremner
2023-07-20 12:08 ` [PATCH 2/2] lib/n_d_remove_message: do not remove unique filename David Bremner
2023-07-22  9:02 ` Speedup for deleting files Tomi Ollila
2023-08-20 15:56   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230720120801.2215538-1-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=ukleinek@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).