When are JSON entries removed from dc.db?

I want to clarify the behavior of WebXDC data in the Delta Chat database (dc.db).
Each sendUpdate() creates a separate row in the msgs table with the update data (including base64 images) stored in the json field.

The question is:
under which events should these rows be deleted, and are they deleted at all?

For example:

  • are WebXDC rows deleted after deleting a chat?
  • are they cleared after removing the webxdc app?
  • does cleanup happen only after VACUUM or some internal processes?
  • or do these rows remain forever and are never cleaned up automatically?

I want to understand the actual behavior of Delta Chat:
Do WebXDC data ever get deleted automatically or not? And if yes, under which user actions?

So this is about messages that are sent with webxdc.sendUpdate(), i.e., for example, the text that you put into the Editor app.

According to the following piece of code, these messages are removed periodically, on “housekeeping”.

It forms a list of all existing messages that are not in the “Trash” chat, and then deletes all the “WebXDC updates” that belong to a message that are not on that list.
To put it simply, the intent is to delete these entries when the message that contained the .xdc file is deleted.

Apparently yes, because all messages from a chat get deleted when a chat is deleted:

1 Like

Alright, let’s say I have a task to maintain my own blog that consists of photos and text. With a large amount of data, in which case will the performance start to drop — if I keep it just in the chat, or in a webxdc app?