Content
View differences
Updated by Wieland Lindenthal 6 months ago
At the moment whoever last edited a document before a (debounce of roughly 5 seconds) will be the user writing the document from Hocuspocus to the documents API. Every time it is a different user, a new journal entry will be created, even though the journal's aggregation time was not exceeded. That is not optimal and will bloat the database.
One solution could be that we keep track on Hocuspocus, who was the last editor in that editing session and use the same user for all subsequent writes to the API, as long as that user is still connected.
**Advantages**:
* OpenProject by nature will reuse existing journals that have not yet exceeded the aggregation time and write into the same one.
**Downsides**:
* Maybe most of the changes were done by another user joining that session. Still all changes would be "incorrectly" attributed to the first user.
**Alternatives:**
* On the backend we always store with a generic user AND save an extra list of involved people (That list is probably useful in any case)
* Downside: Those document writes would not show up in a person's activity. Which is a pity, if you want to detect spammers quickly, for example. If they spam in documents they would not appear.
<br>
One solution could be that we keep track on Hocuspocus, who was the last editor in that editing session and use the same user for all subsequent writes to the API, as long as that user is still connected.
**Advantages**:
* OpenProject by nature will reuse existing journals that have not yet exceeded the aggregation time and write into the same one.
**Downsides**:
* Maybe most of the changes were done by another user joining that session. Still all changes would be "incorrectly" attributed to the first user.
**Alternatives:**
* On the backend we always store with a generic user AND save an extra list of involved people (That list is probably useful in any case)
* Downside: Those document writes would not show up in a person's activity. Which is a pity, if you want to detect spammers quickly, for example. If they spam in documents they would not appear.
<br>