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 766581 - Geary clean up database and attachements over time
Geary clean up database and attachements over time
Status: RESOLVED OBSOLETE
Product: geary
Classification: Other
Component: client+engine
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
: 714101 (view as bug list)
Depends on: 714094
Blocks:
 
 
Reported: 2016-05-17 21:55 UTC by Britt Yazel
Modified: 2019-06-02 10:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Britt Yazel 2016-05-17 21:55:49 UTC
In geary we have an option for how far back we would like messages to be retrieved per account, however once a message is downloaded it seems to reside on the system even when it falls outside of the pre-defined range. Which means that the pre-defined range only really applies to initially setting up the account.

Now, I could be wrong, but I initially set my Gmail account to retrieve "everything", which left it's footprint on my system to be about 3.7GB. Now, if I go in after it has fully synced and set it to "2 weeks" (as is the default), no messages are purged from my database nor attachments deleted from the system. Instead, the footprint stays at 3.7GB.

Perhaps the functionality of this option could be improved to have some sort of a pruning-over-time aspect, such that over years of use the database size doesn't grow to unwieldy proportions. Unless, of course, the user specifies "everything", in which case it would disable any pruning of the database. 
Further, this same cleaning/pruning should apply to attachments as well. (though attachments perhaps should not be auto downloaded, see bug 714094)
Comment 1 Michael Gratton 2016-06-28 02:16:16 UTC
It would be good to get a survey of how other common clients handle this (TB, Outlook, OSX Mail, KMail, Evo, etc) - do any periodically delete attachments over time? IIRC Thunderbird lets you delete attachments manually, but that's pretty onerous.

Perhaps a LRU cache for attachments would be the way to go, but then we need to make sure that people who want them all downloaded and permanently kept are also accounted for.

Between this and Bug 714094, the per-account pref could be something like:

 > Attachments:
 > 
 > (o) Automatically download and keep all
 > ( ) Automatically download and keep recently used
 > ( ) Manually download and keep
Comment 2 Michael Gratton 2017-01-11 03:01:01 UTC
After thinking about this a bit, if Bug 714094 or something similar was fixed, then we could just automatically download attachments for recent messages and/or as needed, just use a LRU cache here.
Comment 3 Michael Gratton 2017-12-08 00:08:46 UTC
*** Bug 714101 has been marked as a duplicate of this bug. ***
Comment 4 Michael Gratton 2019-06-02 10:10:05 UTC
Closing this in favour of https://gitlab.gnome.org/GNOME/geary/issues/453