Bug 375143 - Running a deletion task takes ~10 seconds per deletion
Summary: Running a deletion task takes ~10 seconds per deletion
Status: RESOLVED WORKSFORME
Alias: None
Product: trojita
Classification: Unmaintained
Component: IMAP (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Trojita default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-16 15:24 UTC by Tao Hansen
Modified: 2017-01-17 09:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
IMAP protocol logs (11.24 KB, text/plain)
2017-01-16 18:29 UTC, Tao Hansen
Details
Deletion task 1 (11.74 KB, text/plain)
2017-01-16 22:44 UTC, Tao Hansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tao Hansen 2017-01-16 15:24:46 UTC
Outlook.com IMAP account. Hitting the DEL key on either individual messages or selecting multiple messages for deletion results in the same ~10 sec wait from hitting DEL to removing from my inbox.

Trojita 0.7.1 on Arch Linux.
Comment 1 Jan Kundrát 2017-01-16 16:02:59 UTC
Please attach raw IMAP logs when this happens. You can get access to them from IMAP -> Debugging -> Show IMAP protocol log; the last tab is probably going to be the important one.

Also, how is this shown to the UI? How long does it take for a message to appear in a strike-thourgh font in the listing of messages? How/when do you invoke the Expunge action?
Comment 2 Tao Hansen 2017-01-16 18:29:31 UTC
Created attachment 103442 [details]
IMAP protocol logs
Comment 3 Tao Hansen 2017-01-16 18:31:47 UTC
The Mark as Read and Mark as Deleted buttons animate as depressed, then eight seconds pass and the message deletes without any strikethrough animation. I haven't expunged: this is with a newly managed account.
Comment 4 Jan Kundrát 2017-01-16 21:46:54 UTC
Hi Tao, could you please post a log where you actually attempt to delete some messages as you usually do? The log which is attached here doesn't contain any traffic related to message deleting. I'm trying to understand whether it's the server auto-expunging for you and thereby imposing a non-IMAP delete model, or something completely different.
Comment 5 Tao Hansen 2017-01-16 22:44:18 UTC
Created attachment 103449 [details]
Deletion task 1

Here's a log right after a delete action.
Comment 6 Thomas Lübking 2017-01-17 03:22:39 UTC
> 23:40:28.743 >>> y20 IDLE␍␊
> 23:40:28.920 <<< + IDLE accepted, awaiting DONE command.␍␊
> 23:40:46.408 >>> DONE␍␊
> 23:40:46.409 >>> y21 UID STORE 4556 +FLAGS (\Deleted)␍␊
trojita idled, broke the idleness and marked the mail as deleted ...

> 23:40:46.590 <<< y20 OK IDLE completed.␍␊
> 23:40:46.873 <<< y21 OK STORE completed.␍␊
outlook.com acks idle break and delete flag

> 23:40:46.874 Imap::Mailbox::UpdateFlagsTask Completed
the mail should now be stroke in the message list

> 23:40:52.742 >>> y22 IDLE␍␊
> 23:40:52.926 <<< + IDLE accepted, awaiting DONE command.␍␊
trojita idles again

> 23:40:53.082 <<< * 15 EXPUNGE␍␊
> 23:40:53.082 <<< * 14 EXISTS␍␊
Something™ else triggered an expunge, trojita will update the message list.

=> "Something" might be the server in return to the idle state (if you're not accessing the server with another client at the same time? webmailer?)
Comment 7 Jan Kundrát 2017-01-17 09:14:39 UTC
Thanks for the logs. This is the expected behavior in IMAP where message deletion is a two-step process.

At first, a message is marked as deleted. This is tied to the user hitting the Del key. The UI indicates this state of a message with a strike-trough font.

The second step is to permanently remove messages which are marked as deleted from a given mailbox; this action is called Expunge. According to the logs you've attached, "something" triggered expunge. As Thomas said, this can be another client running in the background, or a server-side feature ("auto expunge") which is configured to remove deleted messages after a short while.

You might be able to configure this in your server's settings. Apart from that, Trojita works as designed.