After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 600860 - Opening IMAP message with large attachment blocks UI
Opening IMAP message with large attachment blocks UI
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.2.x (obsolete)
Other Linux
: Normal enhancement
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[attachments]
: 618076 635868 665675 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-11-05 18:38 UTC by daniele
Modified: 2012-04-13 14:21 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
backtrace of evo during temporary freeze (21.86 KB, text/plain)
2012-04-13 09:50 UTC, David Jaša
  Details
backtrace of e-d-s during temporary freeze (4.17 KB, text/plain)
2012-04-13 09:51 UTC, David Jaša
  Details
evo patch (4.54 KB, patch)
2012-04-13 14:12 UTC, Milan Crha
committed Details | Review

Description daniele 2009-11-05 18:38:22 UTC
Opening a message from imap account with large attachement(5M),
block whole evolution application, not only message window
until it download all attachments

This make Evolution almost unusable with imap and attachments
Comment 1 daniele 2009-11-05 18:42:31 UTC
I forget version 2.28.1 , ubuntu 9.10 package
Comment 2 Akhil Laddha 2010-09-30 05:26:20 UTC
*** Bug 618076 has been marked as a duplicate of this bug. ***
Comment 3 André Klapper 2012-02-08 12:44:38 UTC
For IMAP, attachments are downloaded when you first try to open them, and not when the message is retrieved. The solution is to check "Copy folder content locally for offline operation" in the inbox properties.
Comment 4 André Klapper 2012-02-08 12:44:46 UTC
*** Bug 635868 has been marked as a duplicate of this bug. ***
Comment 5 André Klapper 2012-02-08 12:44:53 UTC
*** Bug 665675 has been marked as a duplicate of this bug. ***
Comment 6 Tadej Janež 2012-02-08 13:56:04 UTC
(In reply to comment #3)
> For IMAP, attachments are downloaded when you first try to open them, and not
> when the message is retrieved.

Yes, this is correct.

> The solution is to check "Copy folder content
> locally for offline operation" in the inbox properties.

Actually, this is not the "right" solution, it would only cover the symptom.

Evolution should download attachments asynchronously, e.g. in a separate
background thread that doesn't block the whole UI. Like the original reported said, the problem is that downloading a large attachment doesn't only block the current message's window but the whole Evolution.

Also, an indication of the download's progress should be displayed to prevent the user from thinking the whole application just froze.
Comment 7 David Jaša 2012-04-13 09:50:52 UTC
Created attachment 211975 [details]
backtrace of evo during temporary freeze
Comment 8 David Jaša 2012-04-13 09:51:31 UTC
Created attachment 211976 [details]
backtrace of e-d-s during temporary freeze

both taken on 2.28
Comment 9 Milan Crha 2012-04-13 09:54:21 UTC
(In reply to comment #7)
> Created an attachment (id=211975) [details]
> backtrace of evo during temporary freeze

The interesting part about backtrace is below (notice the e_attachment_load_async and network I/O in the main thread *the backtrace is from the main thread)):
  • #15 imap_read_response
    at camel-imap-command.c line 396
  • #16 camel_imap_command
    at camel-imap-command.c line 116
  • #17 camel_imap_folder_fetch_data
    at camel-imap-folder.c line 3827
  • #18 write_to_stream
    at camel-imap-wrapper.c line 139
  • #19 decode_to_stream
    at camel-data-wrapper.c line 210
  • #20 camel_mime_part_get_content_size
    at camel-mime-part.c line 1125
  • #21 attachment_load_from_mime_part
    at e-attachment.c line 1785
  • #22 e_attachment_load_async
    at e-attachment.c line 1853
  • #23 efhd_attachment_button
    at em-format-html-display.c line 1419
  • #24 efh_object_requested
    at em-format-html.c line 637

Comment 10 Milan Crha 2012-04-13 14:12:22 UTC
Created attachment 211998 [details] [review]
evo patch

for evolution;

In time of 2.29.5 had been done 6a72dacb7db5, which workarounded the issue by removing code which cased the freeze on message show in a preview panel. This didn't help much, because it moved the issue only slightly later, on time when user clicked the attachment button to access its context menu, like to save it. Then the UI was frozen again.

This patch (it's for 3.4.0) fixes both issues, and makes load of mime part attachments really asynchronous.
Comment 11 Milan Crha 2012-04-13 14:19:50 UTC
Created commit 7c1a7df in evo master (3.5.1+)
Created commit 5cba797 in evo gnome-3-4 (3.4.1+)
Comment 12 Milan Crha 2012-04-13 14:21:54 UTC
There is a little typo in the patch, in "attachemnt-load-context-data", which I fixed before committing. It doesn't have any impact on the patch functionality.