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 720676 - [IMAPX] Do more searching server-side
[IMAPX] Do more searching server-side
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Mailer
3.10.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2013-12-18 13:56 UTC by David Jaša
Modified: 2014-02-03 14:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo output with CAMEL_DEBUG=all (11.40 KB, text/plain)
2013-12-18 13:56 UTC, David Jaša
Details

Description David Jaša 2013-12-18 13:56:10 UTC
Created attachment 264478 [details]
evo output with CAMEL_DEBUG=all

Header searches are quite handy sometimes, e.g. when working with bugzilla email. They're quite inconvenient in Evolution when the respective folder is _not_ cached on the disk because:
1) evo doesn't store all message headers locally
2) evo doesn't invoke server-side search
so the worst-case scenario kicks in: all messages in folder are retrieved from the server only to be discarded again.

IMO Evolution should do both:
  * store all headers: even for folder with 15k messages and extremely large headers (10 kB/message), the header cache is around 15 MB - no big deal these days
  * use server-side searches to avoid download of not-locally-available data that user doesn't want to see

In the attachment is part of evolution console output with CAMEL_DEBUG=all; its start is right after such header-based search is invoked and anything following full bodies is stripped. The search in question is:
match if any of these matches:
  Specific header | X-Bugzilla-Who | contains | fake_email1@example.org
  Specific header | X-Bugzilla-Who | contains | fake_email2@example.com

Evolution version: 3.10.2 @ Fedora 20
Comment 1 Milan Crha 2014-01-16 20:57:44 UTC
I just fixed this, there is more searching done server-side in IMAP+ now. The SEARCH IMAP command doesn't support all the things evolution can search for, but it can cover the most common cases, which speeds searching significantly (especially when the folder content is not required locally). It definitely covers your case. Please note that since this change IMAP+ relies on the server filtering abilities, thus if a server doesn't follow RFC [1] for the HEADER search, which says "the value _contains_", then it can result in incorrect messages being shown (for example, a Zimbra server I tested this with does "begins with", instead of "contains").

Created commit 597802d in eds master (3.11.5+) [2]
Created commit 540a2df in eds gnome-3-10 (3.10.4+)

[1] http://tools.ietf.org/html/rfc3501#section-6.4.4
[2] https://git.gnome.org/browse/evolution-data-server/commit/?id=597802d
Comment 2 Milan Crha 2014-02-03 14:37:56 UTC
The first patch	caused server-side searching also for cases where all
data were available locally, which made	searching slower. This tests
first if everything in match-all is available locally, and if so, then
it uses	local search, rather than the server side.

Created commit 54b89c7 in eds master (3.11.90+)
Created commit 6a8a680 in eds gnome-3-10 (3.10.4+)