]> rtime.felk.cvut.cz Git - notmuch.git/commit
lib: Only sync modified message documents
authorAustin Clements <amdragon@mit.edu>
Fri, 5 Jun 2015 17:28:33 +0000 (19:28 +0200)
committerDavid Bremner <david@tethera.net>
Tue, 4 Aug 2015 06:54:46 +0000 (08:54 +0200)
commite6ad3a5dd4ca7a09a4760c4eb6721217cc906aaa
tree9114e6747dc7d8012e0586e5751ac0442e44df64
parent2eb558fd9b369458c23b57b44281758bd17a5580
lib: Only sync modified message documents

Previously, we updated the database copy of a message on every call to
_notmuch_message_sync, even if nothing had changed.  In particular,
this always happens on a thaw, so a freeze/thaw pair with no
modifications between still caused a database update.

We only modify message documents in a handful of places, so keep track
of whether the document has been modified and only sync it when
necessary.  This will be particularly important when we add message
revision tracking.
lib/message.cc