Re: Speedup for deleting files

Subject: Re: Speedup for deleting files

Date: Sat, 22 Jul 2023 12:02:08 +0300

To: David Bremner,


From: Tomi Ollila

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]:

Series LGTM.

notmuch mailing list --
To unsubscribe send an email to