Skip to content

Commit

Permalink
log the time spent during optimization process
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed May 15, 2022
1 parent 593a275 commit dbb5d02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/sql_init.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,11 @@ function setDbAsInitialized() {

function optimize() {
log.info("Optimizing database");
const start = Date.now();

sql.execute("PRAGMA optimize");

log.info("Optimization finished.");
log.info(`Optimization finished in ${Date.now() - start}ms.`);
}

dbReady.then(() => {
Expand Down

0 comments on commit dbb5d02

Please sign in to comment.