From 9b84aff4b68c3cef3328c85ac12418048b169cee Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 25 Jan 2018 16:29:00 +0100 Subject: Store all BLOB properties inline. BLOB properties had a couple of intended purposes: * Allow large payloads to be streamed directly to disk, and then be handled by reference. * Allow zero-copy handling. * Keep the database values compact so we can avoid traversing large BLOBS. However, they came at the cost of code-complexity, and we lost all the benefits of our storage layer, such as transactions. Measurements showed, that for email (the intended primary usecase), the overhead is hardly measurable, with most parts performing better, or at least not worse. We additionally also gain file-system independence, which may help on other platforms. The biggest drawback is probably that large payloads need to be written to disk twice, because of the synchronizer queue (once for the queue, once for the actual data). --- common/domain/applicationdomaintype.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/domain') diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 77754c1..8a0daef 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h @@ -439,7 +439,8 @@ struct SINK_EXPORT Mail : public Entity { SINK_PROPERTY(bool, Unread, unread); SINK_PROPERTY(bool, Important, important); SINK_REFERENCE_PROPERTY(Folder, Folder, folder); - SINK_BLOB_PROPERTY(MimeMessage, mimeMessage); + // SINK_BLOB_PROPERTY(MimeMessage, mimeMessage); + SINK_PROPERTY(QByteArray, MimeMessage, mimeMessage); SINK_EXTRACTED_PROPERTY(bool, FullPayloadAvailable, fullPayloadAvailable); SINK_PROPERTY(bool, Draft, draft); SINK_PROPERTY(bool, Trash, trash); -- cgit v1.2.3