Skip to content

Commit

Permalink
opt: record xapian total length
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Jul 19, 2024
1 parent d9c5673 commit 3976ee3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/ftshelpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,21 @@ void makeFTSIndex( BtreeIndexing::BtreeDictionary * dict, QAtomicInt & isCancell

// Free memory
offsets.clear();
auto totalLength = db.get_total_length();
qDebug() << "xapian database total length:" << totalLength;

{
auto totalLength = db.get_total_length();
qDebug() << "xapian database total length:" << totalLength;
}

db.commit();

db.compact( dict->ftsIndexName() );
auto totalLength = db.get_total_length();
qDebug() << "xapian database total length(compact):" << totalLength;

{
auto totalLength = db.get_total_length();
qDebug() << "xapian database total length(compact):" << totalLength;
}

db.close();

Check notice on line 177 in src/ftshelpers.cc

View check run for this annotation

codefactor.io / CodeFactor

src/ftshelpers.cc#L48-L177

Complex Method

Utils::Fs::removeDirectory( dict->ftsIndexName() + "_temp" );
Expand Down

0 comments on commit 3976ee3

Please sign in to comment.