chatmail / chatmail/core

`msgs` table takes a lot of space for some users

Open
#7,599 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
929
Forks
143
Avg merge
1d 20h
Merged PRs (30d)
53

Description

HTML messages are stored by having a whole .eml blob
in the unfortunately named "mime_headers" column
of the msgs table.

There are user reports that msgs table
takes a lot of space since introduction
of https://github.com/chatmail/core/pull/7486
which allowed us to see that the space is taken by msgs table.
@adbenitez has some logs, can probably add the sizes of the app data, msgs table and number of rows from the log.

This is likely caused by mime_headers column.
We even previously compressed it:
https://github.com/chatmail/core/pull/4129

The next step for figuring it out
is to find out all the cases when `mime_headers` is used.
Can it be caused by:
1. Just sending a message with large text?
2. Receiving undecryptable messages?
3. Receiving a message from the bot that uses set_html?

If we don't know what causes this, the issue can be closed by adding more information to the log, e.g. with the sum of sizes of `mime_headers` column and the number of rows that use it and `mime_headers` size breakdown so we can confirm that `mime_headers` is the reason.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.