index: generalize pre-fetch paths

We already pre-fetched db file paths for the cleanup-case (since
cdb619e4f), now let's generalize this to all indexing.

For now this is mostly performance-neutral (lazy-rescan is slightly
faster); however, this simplifies the code.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-21 09:18:54 +03:00
committed by Seth Ladygo
parent 86464cd083
commit 7d60d2728a
5 changed files with 145 additions and 220 deletions

View File

@ -347,6 +347,9 @@ World!
// term != msg2->document().xapian_document().termlist_end(); ++term)
// g_message(">>> %s", (*term).c_str());
// last-change is recorded as part of a commit.
store->xapian_db().request_commit(true/*force*/);
const auto stats{store->statistics()};
g_assert_cmpuint(stats.size,==,store->size());
g_assert_cmpuint(stats.last_index,==,0);