Fixed bad optimize condition

This commit is contained in:
emeric
2023-11-08 20:16:31 +01:00
parent 6bb6dd6add
commit c2e1c5d9df
@@ -309,7 +309,7 @@ namespace Scanner
_progressCallback(context.currentStepStats);
// optimize the database during scan (if we import a very large database, it may be too late to do it once at end)
if ((context.stats.nbChanges() % 5'000) == 0)
if ((context.currentStepStats.processedElems % 1'000) == 0)
_db.getTLSSession().optimize();
}