Skip to content

Commit

Permalink
SQL: Re-enable saving of message headers
Browse files Browse the repository at this point in the history
  • Loading branch information
benbucksch committed Nov 28, 2024
1 parent e40cc57 commit 850da66
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions app/logic/Mail/IMAP/IMAPFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -371,15 +371,11 @@ export class IMAPFolder extends Folder {
.first as IMAPEMail; // oldest
}

/** Save headers of newly discovered emails */
/** Save partial headers of newly discovered emails.
*
* Note: Completely downloaded emails are not saved here, but in
* `downloadMessages()` -> `msg.saveCompleteMessage()` */
protected async saveNewMsgs(msgs: Collection<IMAPEMail>) {
// Saving message headers is slow and expensive,
// and it drags down the whole app.
// It's faster to re-download the headers from the server.
// Disable saving only message headers for now.
// We will still save the completely downloaded emails, in
// `downloadMessages()` -> `msg.saveCompleteMessage()`
return;
let startTime = Date.now();
await this.storage.saveMessages(msgs);
let saveTime = Date.now() - startTime;
Expand Down

0 comments on commit 850da66

Please sign in to comment.