Speedup for deleting files

Subject: Speedup for deleting files

Date: Thu, 20 Jul 2023 09:07:59 -0300

To: notmuch@notmuchmail.org

Cc: ukleinek@debian.org

From: David Bremner


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/

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: