Page MenuHomePhorge

Purge and backfill events
ClosedPublic

Authored by tusooa on Fri, Jan 30, 2:42 PM.
Tags
None
Referenced Files
F37386836: D275.1770139233.diff
Mon, Feb 2, 9:20 AM
F37030239: D275.1770067692.diff
Sun, Feb 1, 1:28 PM
F37015726: D275.1770065017.diff
Sun, Feb 1, 12:43 PM
F37003984: D275.1770062886.diff
Sun, Feb 1, 12:08 PM
Subscribers
None

Details

Summary

This is the last part of the event storage implementation in kazv. It purges previous events via a timer, and it backfills when the timeline is scrolled to the beginning. With this, we will hopefully solve the problem of long session loading time and high memory usage.

Type: add

CCBUG: https://iron.lily-is.land/T165

Test Plan

Set environment variable export QT_LOGGING_RULES='moe.kazv.mxc*=true'.
Load a session with kazv. Open a room.
Wait for enough time (5mins) and verify that the log contains Purge room events stat:.
Verify that the opened room is not purged.
Open another room. Verify that the events in that room is purged.
Verify that more events will be loaded when you scroll to the top.
Close and load the session again. Verify it takes much less time to load.
Verify that number of events saved to the storage in the log is much fewer.

Diff Detail

Repository
rK kazv
Lint
Lint Not Applicable
Unit
Tests Not Applicable