mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 08:16:09 +08:00
[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:
parent
3befaf2d6e
commit
b323e38f7c
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue