[client-sync] Increase sqlite page_size and cache_size

Summary:
The defaults are a little low. edgehill.db already does this. There's no
obvious effect on smaller dbs, but we should at least make the two
consistent.

Test Plan: Run locally

Reviewers: spang, evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4395
This commit is contained in:
Mark Hahnenberg 2017-04-07 12:30:43 -07:00
parent 3befaf2d6e
commit b323e38f7c

View file

@ -18,12 +18,15 @@ class LocalDatabaseConnector {
const dbLog = (q, time) => {
debugVerbose(StringUtils.trimTo(`🔷 (${time}ms) ${q}`))
}
return new Sequelize(dbname, '', '', {
const sequelize = new Sequelize(dbname, '', '', {
storage: storage,
dialect: "sqlite",
benchmark: debugVerbose.enabled,
logging: debugVerbose.enabled ? dbLog : false,
})
sequelize.query('PRAGMA page_size = 8192');
sequelize.query('PRAGMA cache_size = 4096');
return sequelize;
}
forAccount(accountId) {