mirror of
https://github.com/chatmail/core.git
synced 2026-05-05 14:26:30 +03:00
imap: call delete_expired_imap_messages() less often
This operation takes roughly 0.3 s on a moderate size database. Calling it once before scanning all folders and scanning the watched folder instead of each time after downloading a message from a folder speeds up IMAP loop.
This commit is contained in:
@@ -180,7 +180,7 @@ impl rusqlite::types::ToSql for MsgId {
|
||||
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput> {
|
||||
if self.0 <= DC_MSG_ID_LAST_SPECIAL {
|
||||
return Err(rusqlite::Error::ToSqlConversionFailure(
|
||||
format_err!("Invalid MsgId").into(),
|
||||
format_err!("Invalid MsgId {}", self.0).into(),
|
||||
));
|
||||
}
|
||||
let val = rusqlite::types::Value::Integer(self.0 as i64);
|
||||
|
||||
Reference in New Issue
Block a user