Do not try to optimize when there are too few files, it seems to bring more drawbacks than benefits

This commit is contained in:
emeric
2025-07-18 19:29:08 +02:00
parent f64a93b5b6
commit f51ceb933e
20 changed files with 116 additions and 52 deletions
@@ -194,12 +194,7 @@ namespace lms::scanner
{
auto transaction{ session.createReadTransaction() };
context.currentStepStats.totalElems = 0;
context.currentStepStats.totalElems += db::Track::getCount(session);
context.currentStepStats.totalElems += db::Image::getCount(session);
context.currentStepStats.totalElems += db::TrackLyrics::getExternalLyricsCount(session);
context.currentStepStats.totalElems += db::PlayListFile::getCount(session);
context.currentStepStats.totalElems += db::ArtistInfo::getCount(session);
context.currentStepStats.totalElems = session.getTotalFilesCount();
}
LMS_LOG(DBUPDATER, DEBUG, context.currentStepStats.totalElems << " files to be checked...");