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 632683 - Remove-duplicates should work on selection
Remove-duplicates should work on selection
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.0.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2010-10-20 11:55 UTC by Akhil Laddha
Modified: 2013-09-13 01:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (18.67 KB, patch)
2010-11-10 12:37 UTC, Milan Crha
committed Details | Review

Description Akhil Laddha 2010-10-20 11:55:48 UTC
evolution 2.91.2

bug 587011 has been fixed and remove duplicate messages feature is part of Evolution. When i try the feature with Inbox (not belong to local store, it's on server), i see little cpu spike and UI becomes unresponsive for a while. It will come back to normal after finishing the operation.

gdb traces of evolution

Thread 1 (Thread 0xb605c830 (LWP 2168))

  • #0 __kernel_vsyscall
  • #1 fsync
    from /lib/libpthread.so.0
  • #2 stream_fs_flush
    at camel-stream-fs.c line 127
  • #3 camel_stream_flush
    at camel-stream.c line 196
  • #4 stream_filter_flush
    at camel-stream-filter.c line 260
  • #5 camel_stream_flush
    at camel-stream.c line 196
  • #6 stream_filter_flush
    at camel-stream-filter.c line 260
  • #7 camel_stream_flush
    at camel-stream.c line 196
  • #8 data_wrapper_decode_to_stream_sync
    at camel-data-wrapper.c line 216
  • #9 camel_data_wrapper_decode_to_stream_sync
    at camel-data-wrapper.c line 812
  • #10 mime_part_write_to_stream_sync
    at camel-mime-part.c line 663
  • #11 camel_data_wrapper_write_to_stream_sync
    at camel-data-wrapper.c line 699
  • #12 multipart_write_to_stream_sync
    at camel-multipart.c line 129
  • #13 camel_data_wrapper_write_to_stream_sync
    at camel-data-wrapper.c line 699
  • #14 mime_part_write_to_stream_sync
    at camel-mime-part.c line 666
  • #15 mime_message_write_to_stream_sync
    at camel-mime-message.c line 250
  • #16 camel_data_wrapper_write_to_stream_sync
    at camel-data-wrapper.c line 699
  • #17 mapi_folder_get_message_sync
    at camel-mapi-folder.c line 1408
  • #18 camel_folder_get_message_sync
    at camel-folder.c line 3247
  • #19 get_message_checksum
    at e-mail-shell-view-actions.c line 433
  • #20 action_mail_folder_remove_duplicates
    at e-mail-shell-view-actions.c line 502
  • #21 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #22 g_closure_invoke
    at gclosure.c line 766
  • #23 signal_emit_unlocked_R
    at gsignal.c line 3252
  • #24 g_signal_emit_valist
    at gsignal.c line 2983
  • #25 g_signal_emit
    at gsignal.c line 3040
  • #26 _gtk_action_emit_activate
    at gtkaction.c line 794
  • #27 IA__gtk_action_activate
    at gtkaction.c line 824
  • #28 gtk_real_menu_item_activate
    at gtkmenuitem.c line 1411
  • #29 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 79
  • #30 g_type_class_meta_marshal
    at gclosure.c line 877
  • #31 g_closure_invoke
    at gclosure.c line 766
  • #32 signal_emit_unlocked_R
    at gsignal.c line 3182
  • #33 g_signal_emit_valist
    at gsignal.c line 2983
  • #34 g_signal_emit
    at gsignal.c line 3040
  • #35 IA__gtk_widget_activate
    at gtkwidget.c line 5008
  • #36 IA__gtk_menu_shell_activate_item
    at gtkmenushell.c line 1256
  • #37 gtk_menu_shell_button_release
    at gtkmenushell.c line 683
  • #38 gtk_menu_button_release
    at gtkmenu.c line 3011
  • #39 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 86
  • #40 g_type_class_meta_marshal
    at gclosure.c line 877
  • #41 g_closure_invoke
    at gclosure.c line 766
  • #42 signal_emit_unlocked_R
    at gsignal.c line 3290
  • #43 g_signal_emit_valist
    at gsignal.c line 2993
  • #44 g_signal_emit
    at gsignal.c line 3040
  • #45 gtk_widget_event_internal
    at gtkwidget.c line 4977
  • #46 IA__gtk_widget_event
    at gtkwidget.c line 4774
  • #47 IA__gtk_propagate_event
    at gtkmain.c line 2460
  • #48 IA__gtk_main_do_event
    at gtkmain.c line 1665
  • #49 gdk_event_dispatch
    at gdkevents-x11.c line 2377
  • #50 g_main_dispatch
    at gmain.c line 2149
  • #51 g_main_context_dispatch
    at gmain.c line 2702
  • #52 g_main_context_iterate
    at gmain.c line 2780
  • #53 g_main_loop_run
    at gmain.c line 2988
  • #54 IA__gtk_main
    at gtkmain.c line 1237
  • #55 main
    at main.c line 689

Comment 1 Matthew Barnes 2010-10-20 12:16:51 UTC
It's calling camel_folder_get_message_sync() in Thread 1.  It should call camel_folder_get_message() instead, which is asynchronous.
Comment 2 Akhil Laddha 2010-11-09 09:54:42 UTC
As per discussion with Milan on irc

1) We can add 'remove duplicate' in right click folder pop up, it will improve usability instead of going through menu.

2) We can warn user before performing the operation, something like 

Primary - Are you sure you want to delete duplicate messages ?
Secondary - All duplicate messages in the selected folder will be deleted.

It will be good to have checkbox with "do not ask again" in case user feels above warning useless as he may always want to perform operation.
Comment 3 Milan Crha 2010-11-10 12:37:45 UTC
Created attachment 174193 [details] [review]
evo patch

for evolution;

We had a chat with Akhil on IRC and this patch does something slightly different from what is written above, basically:
- remove-duplicates moved from folder to selection operation, there should be at least two messages selected to see this option
- remove-duplicates fetches messages asynchronously
- remove-duplicates shown in popup menu of the message-list
- remove-attachments works whole asynchronously - I added an op for it
Comment 4 Milan Crha 2010-11-10 12:39:18 UTC
Created commit 59da2bd in evo master (.2.91.3+)