atagen

macltok

public
Star0
Watch0

Commit 6a5963d5bd63

tarball

atagen <boss@atagen.co>2026-10-28 05:09 UTC

1 file changed+5-0
engine: grow the room list 500 rooms a step

tuwunel resends every room in the requested range each time the room list grows, and at the sdk's 100 a step a 399 room account fed most rooms to the event cache four or five times during a catch-up.
Modified file: src/engine/mod.rs+5 additions
@@ -247,6 +247,10 @@ impl TaskContext {
247247 }
248248 }
249249
250+/// tuwunel resends every room in range each time the room list grows, so the sdk's 100 a step
251+/// had a 399 room account hand most rooms to the event cache four or five times
252+const ROOM_LIST_GROWING_BATCH: u32 = 500;
253+
250254 /// tasks catch their own panics so each comes back with its context, since joining
251255 /// through the sdk's executor gives no task id to look one up by. wasm has nothing to catch
252256 fn panic_message(payload: Box<dyn std::any::Any + Send>) -> String {
@@ -430,6 +434,7 @@ impl Engine {
430434 (ROOM_PREVIEW_URLS.into(), String::new()),
431435 ])
432436 .with_room_list_response_commit_hook(mentions.hook())
437+ .with_room_list_growing_batch_size(ROOM_LIST_GROWING_BATCH)
433438 .build()
434439 .await
435440 .map_err(EngineError::SyncService)?,