mirror of
https://github.com/zotero/zotero.git
synced 2026-10-10 03:28:10 +00:00
Skip startup full-text index purge and optimize when unnecessary
purgeOrphanedContent() ran on every startup, unlike the other
data-object purges, which are gated on the purge.* prefs.
startQueueDrain() also ran an FTS5 'optimize' even when the queues were
empty.
Gate the former on purge.items and the latter on having indexed
something.
(cherry picked from commit 8f6dc583b8)
This commit is contained in:
parent
06329d3379
commit
2b7057a12e
2 changed files with 7 additions and 2 deletions
|
|
@ -1817,7 +1817,9 @@ Zotero.Fulltext = Zotero.FullText = new function () {
|
|||
itemProgress.setProgress(100);
|
||||
}
|
||||
}
|
||||
await this.optimizeContentIndex();
|
||||
if (done > 0) {
|
||||
await this.optimizeContentIndex();
|
||||
}
|
||||
// Reclaim the space freed by a rebuild (e.g., an index-format change dropping the old
|
||||
// tables), which can be most of the file; the freelist gate makes this a no-op on
|
||||
// ordinary startups
|
||||
|
|
|
|||
|
|
@ -1971,7 +1971,10 @@ const { CommandLineOptions } = ChromeUtils.importESModule("chrome://zotero/conte
|
|||
await Zotero.DB.executeTransaction(async function () {
|
||||
return Zotero.Tags.purge();
|
||||
});
|
||||
await Zotero.FullText.purgeOrphanedContent();
|
||||
// Items.purge() below resets the pref
|
||||
if (Zotero.Prefs.get('purge.items')) {
|
||||
await Zotero.FullText.purgeOrphanedContent();
|
||||
}
|
||||
await Zotero.Items.purge();
|
||||
// DEBUG: this might not need to be permanent
|
||||
//yield Zotero.DB.executeTransaction(async function () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue