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 714061 - Don't store attachments in database
Don't store attachments in database
Status: RESOLVED OBSOLETE
Product: geary
Classification: Other
Component: engine
master
Other All
: High normal
: ---
Assigned To: Geary Maintainers
Geary Maintainers
Depends on: 776309
Blocks: 713956
 
 
Reported: 2013-01-05 06:34 UTC by Jim Nelson
Modified: 2019-06-02 10:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Lindsay 2013-11-21 20:24:38 UTC


---- Reported by jim@yorba.org 2013-01-05 10:34:00 -0800 ----

Original Redmine bug id: 6185
Original URL: http://redmine.yorba.org/issues/6185
Searchable id: yorba-bug-6185
Original author: Jim Nelson
Original description:

Currently Geary stores the entire message in the database. This was a
controversial decision but one we made for reasons of expediency. Slicing up
the message between the filesystem and the database has its own set of
problems.

However, if the database begins filling up with large attachments, that could
cause all kinds of performance problems. We should attempt to find a way
around this issue.



---- Additional Comments From geary-maint@gnome.bugs 2013-04-03 18:30:00 -0700 ----

### History

####

#1

Updated by Jim Nelson 10 months ago

  * **Tracker** changed from _Bug_ to _Feature_

####

#2

Updated by Jim Nelson 10 months ago

  * **Target version** changed from _0.3.0_ to _0.4.0_

####

#3

Updated by Jim Nelson 8 months ago

  * **Target version** changed from _0.4.0_ to _0.5.0_



--- Bug imported by chaz@yorba.org 2013-11-21 20:24 UTC  ---

This bug was previously known as _bug_ 6185 at http://redmine.yorba.org/show_bug.cgi?id=6185

Unknown milestone "unknown in product geary. 
   Setting to default milestone for this product, "---".
Setting qa contact to the default for this product.
   This bug either had no qa contact or an invalid one.
Resolution set on an open status.
   Dropping resolution 

Comment 1 Federico Bruni 2014-02-27 13:11:34 UTC
I see that attachments are saved in ~/.local/share/geary/<account>/attachments
They are saved _also_ in the database? (probably yes, because I see that my current .db file is 300 MB, which I guess it's a lot for 2 weeks sync).
Comment 2 Jim Nelson 2014-03-03 21:30:57 UTC
The database stores the full header and body of each message, which includes the attachments in their encoded forms.  The reason they're also stored in the attachments/ directory is to make their decoded form (which is the form that's useful to applications and humans) available for drag-and-drop and saving (which is really a copy operation).  That's also how we thumbnail the attachments.

The purpose of this ticket is to find a way not to store all that encoded data in the database.  In some ways this ticket is related to and at odds with bug #714094, which is to optionally download attachments.  Charles' comment in that ticket is to never create the attachment file without the user's explicit permission.
Comment 3 Kristian Rink 2016-09-19 06:14:45 UTC
Adding myself to this; in my business mail account, geary.db right now has a size of 13GB and is barely usable (see https://bugzilla.gnome.org/show_bug.cgi?id=713449#c2 too).
Comment 4 Michael Gratton 2017-01-30 05:23:45 UTC
This may also help Bug 713956, so adding it as a dependency.
Comment 5 Michael Gratton 2019-06-02 10:09:06 UTC
Closing this in favour of https://gitlab.gnome.org/GNOME/geary/issues/453