From 863b5125f978ff0cda33bf634f0bedaf61d14277 Mon Sep 17 00:00:00 2001 From: Julian Sparber Date: Wed, 5 May 2021 19:55:19 +0200 Subject: [PATCH] session: Set lazy-loading on state events instead of the timeline Element does enable it only for state events and for timeline no speed improvment can be observed. fixes: https://gitlab.gnome.org/GNOME/fractal/-/issues/768 --- src/session/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/session/mod.rs b/src/session/mod.rs index 8f674e85..7638e50b 100644 --- a/src/session/mod.rs +++ b/src/session/mod.rs @@ -239,12 +239,13 @@ impl Session { if success { // TODO: only create the filter once and reuse it in the future + let room_event_filter = assign!(RoomEventFilter::default(), { + lazy_load_options: LazyLoadOptions::Enabled {include_redundant_members: false}, + }); let filter = assign!(FilterDefinition::default(), { room: assign!(RoomFilter::empty(), { include_leave: true, - timeline: assign!(RoomEventFilter::default(), { - lazy_load_options: LazyLoadOptions::Enabled {include_redundant_members: false}, - }), + state: room_event_filter, }), });