GNOME Bugzilla – Bug 785718
Optimize Maildir sync/check to not load whole summary
Last modified: 2017-08-04 10:41:06 UTC
Created attachment 356762 [details] Two backtrace after telling Evolution to quit `(gdb) t a a bt f` Debian Sid/unstable with Evolution 3.22.6 is used. After bug #785212, I disabled all my virtual/search folders (vFolder). This improved Evolution’s “quitting time” quite a bit from several minutes to between 60 to 120 seconds. Please find two backtrace from while Evolution is quitting attached.
Thanks for a bug report. If I read the backtraces properly, then you've configured to empty Trash on exit of evolution. It looks like that at least. The thing is that your On This Computer folders are opened one by one and it's checked whether there are any deleted message and those are eventually expunged. It does that in a very ineffective way, by loading the whole folder summary into memory. Could you verify that it's about the Empty Trash on exit, please? It's in Edit->Preferences->Mail Preferences->General tab->Delete Mail section.
Created attachment 356916 [details] Four traces after telling Evolution to quit (without empty trash on exit) `(gdb) t a a bt f` (In reply to Milan Crha from comment #1) > Thanks for a bug report. If I read the backtraces properly, then you've > configured to empty Trash on exit of evolution. It looks like that at least. > The thing is that your On This Computer folders are opened one by one and > it's checked whether there are any deleted message and those are eventually > expunged. It does that in a very ineffective way, by loading the whole > folder summary into memory. I believe my folder summary files are quite big. Several hundred of megabytes. > Could you verify that it's about the Empty Trash on exit, please? It's in > Edit->Preferences->Mail Preferences->General tab->Delete Mail section. Disabling the feature to empty the trash on exit of Evolution did not improve the situation. Please find the straces attached.
(In reply to Paul Menzel from comment #2) > Disabling the feature to empty the trash on exit of Evolution did not > improve the situation. Please find the straces attached. Thanks. I see it still calls camel_store_synchronize_sync(), this time without requesting expunge, which corresponds with that option being off in Preferences. Let me try to figure out whether I can "optimize" maildir_summary_check() to not call camel_folder_summary_prepare_fetch_all() at all.
I managed to do changes to optimize Maildir's sync/check functions to work without loading the whole summary into memory, but the change is slightly controversial, thus I decided to commit it only to the development version. Any early testing is welcome, though it would work for 3.24.x and later only (due to changes in CamelMessageInfo). Created commit d71b025 in eds master (3.25.90+)