-
Notifications
You must be signed in to change notification settings - Fork 289
event graph: add an initial implementation #3061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the direction, and so far as I understand it, this looks good. Thanks!
(Trying a rebase with #3070, to see if I can reproduce the slow test run 🤔) |
Above push was another rebase, now that the integration test failure has been fixed in |
This is mostly a demonstration of how to plug this with the timeline, and how little it changes as a result. Remove read receipts
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3061 +/- ##
==========================================
+ Coverage 83.72% 83.77% +0.05%
==========================================
Files 223 224 +1
Lines 23367 23454 +87
==========================================
+ Hits 19564 19649 +85
- Misses 3803 3805 +2 ☔ View full report in Codecov by Sentry. |
It's super slow (as it recreates and backpaginates from the start again) and unused in both EX apps, which are our main FFI embedders.
It's only used in test code, so it's not worth exposing to the SlidingSyncRoom object (and the Room already has such a timeline function, if needs be).
@andybalaam I consider there are enough changes that this justifies a new review, if you have some time. The new commits introduce the following changes:
And two bonus commits, that could be moved to another PR if judged controversial
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good. Note that something like poll_history is definitely going to be needed sometime, but happy for it to be removed if the implementation is no good. Any plan for how to do it better?
Yeah, if the timeline becomes a pure view over an existing set of events, it could be resurrected as such and be much more performant. |
This is mostly a demonstration of how to plug the
EventGraph
with the timeline, add some initial types and documentation, and how little it changes the timeline as a result.One thing I'm not satisfied with is that the
TimelineBuilder::build()
function should really be fallible eventually, because thesubscribe()
would read events from the storage, which is fallible. I've tried to make it so, but in the sliding sync code we're lazily initializing aTimeline
usingTimelineBuilder
, and that can't fail, or we'd need the caller to check the result each time. Needs to be properly solved now, or as the immediate next PR.I've also started a WIP to move the support for read receipts (not unread counters yet) from the Timeline into the Event graph, as a further proof of concept, and I might wait for it before requesting review here.
I'll move back to draft as soon as I get some test results :-)
Part of #3058.