Made the step 'check for removed files' faster when nothing was actually removed

This commit is contained in:
emeric
2025-07-18 18:39:50 +02:00
parent aa23350f56
commit f31d366731
12 changed files with 329 additions and 152 deletions
@@ -363,14 +363,14 @@ namespace lms::scanner
_progressCallback(context.currentStepStats);
};
JobQueue queue{ getJobScheduler(), 20, processJobsDone, 1, 0.85F };
{
JobQueue queue{ getJobScheduler(), 20, processJobsDone, 1, 0.85F };
db::ArtistId lastRetrievedArtistId{};
db::IdRange<db::ArtistId> artistIdRange;
while (fetchNextArtistIdRange(session, lastRetrievedArtistId, artistIdRange))
queue.push(std::make_unique<ComputeArtistArtworkAssociationsJob>(_db, searchParams, artistIdRange));
queue.finish();
db::ArtistId lastRetrievedArtistId{};
db::IdRange<db::ArtistId> artistIdRange;
while (fetchNextArtistIdRange(session, lastRetrievedArtistId, artistIdRange))
queue.push(std::make_unique<ComputeArtistArtworkAssociationsJob>(_db, searchParams, artistIdRange));
}
// process all remaining associations
updateArtistPreferredArtworks(session, artistArtworkAssociations, false);