indexer: make lazy check even lazier

In lazy-mode, we were skipping directories that did not change; however,
this didn't help for the case were users received new messages in big
maildirs.

So, add another check where we compare the ctime of message files with
the time of the last indexing operation. If it's smaller, ignore the
message-file. This is faster than having to consult the Xapian database
for each message.

Note that this requires in mu4e:
      (setq mu4e-index-lazy-check t)
or
   --lazy-check
as a parameter for 'mu index'.
This commit is contained in:
Dirk-Jan C. Binnema
2024-11-10 13:37:17 +02:00
parent fa59040ebc
commit b0d8d42dd2
3 changed files with 30 additions and 15 deletions

View File

@ -54,8 +54,8 @@ public:
bool ignore_noupdate{};
/**< ignore .noupdate files */
bool lazy_check{};
/**< whether to skip directories that don't have a changed
* mtime */
/**< whether to skip directories or message files that haven't changed since the
* previous indexing operation, based on their ctime */
};
/**