mirror of
https://github.com/chatmail/core.git
synced 2026-05-04 13:56: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:
@@ -28,7 +28,6 @@ use crate::context::Context;
|
||||
use crate::dc_receive_imf::{
|
||||
dc_receive_imf_inner, from_field_to_contact_id, get_prefetch_parent_message, ReceivedMsg,
|
||||
};
|
||||
use crate::ephemeral::delete_expired_imap_messages;
|
||||
use crate::events::EventType;
|
||||
use crate::headerdef::{HeaderDef, HeaderDefMap};
|
||||
use crate::job::{self, Action};
|
||||
@@ -459,9 +458,6 @@ impl Imap {
|
||||
.await
|
||||
.context("fetch_new_messages")?;
|
||||
|
||||
// Mark expired messages for deletion.
|
||||
delete_expired_imap_messages(context).await?;
|
||||
|
||||
self.move_messages(context, watch_folder)
|
||||
.await
|
||||
.context("move_messages")?;
|
||||
|
||||
Reference in New Issue
Block a user