Manually vacuum the DB every time the app is started

This commit is contained in:
Niels Andriesse 2021-04-19 15:58:46 +10:00
parent b73832438a
commit edd9139fe0
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ void VerifyRegistrationsForPrimaryStorage(OWSStorage *storage)
_dbReadWriteConnection = [self newDatabaseConnection];
_uiDatabaseConnection = [self newDatabaseConnection];
// Vacuum the database
[self.dbReadWriteConnection vacuum];
// Increase object cache limit. Default is 250.
_uiDatabaseConnection.objectCacheLimit = 500;
[_uiDatabaseConnection beginLongLivedReadTransaction];