shrink memory every X messages #9
@ -293,6 +293,7 @@ class MessagesDbImpl : public MessagesDbSyncInterface {
|
||||
|
||||
if (seqno_ % 8128 == 0) {
|
||||
TRY_STATUS(db_memory_.exec("DELETE FROM messages WHERE seqno < " + to_string(seqno_ - 7168)));
|
||||
TRY_STATUS(db_.exec("PRAGMA shrink_memory"));
|
||||
}
|
||||
|
||||
add_message_stmt_.bind_int32(12, seqno_).ensure();
|
||||
|
Reference in New Issue
Block a user