Use async task parallelization to accelerate handling new rooms from the room list service#696
Conversation
Parallelized room processing and batched subscriptions in room list service loop. Reduced sequential async calls for `from_room` and consolidated `subscribe_to_rooms` calls. Preserved existing behavior regarding room state subscriptions. Co-authored-by: kevinaboos <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…ubscriptions * Parallelize `from_room` conversion in `room_list_service_loop` using `join_all`. * Batch `subscribe_to_rooms` calls for Joined and Invited rooms to reduce SDK overhead. * Update `add_new_room` to support deferred subscription. * Fix regression where Invited rooms were excluded from batched subscription. * Ensure correct type coercion for `subscribe_to_rooms`. Co-authored-by: kevinaboos <[email protected]>
* Parallelize `from_room` conversion in `room_list_service_loop` using `join_all`. * Batch `subscribe_to_rooms` calls for all new rooms in `Append` and `Reset` events to reduce SDK overhead. * Remove `subscribe` filtering/logic from `add_new_room`; caller is now responsible for subscription. * Ensure `subscribe_to_rooms` is called before `add_new_room` in all single-room update cases. * Use concurrent processing for large room list updates. Co-authored-by: kevinaboos <[email protected]>
* Parallelize `from_room` conversion in `room_list_service_loop` using `join_all`. * Parallelize `add_new_room` calls in `Append` and `Reset` events to concurrently fetch latest events and setup timelines. * Batch `subscribe_to_rooms` calls for all new rooms in `Append` and `Reset` events to reduce SDK overhead. * Remove `subscribe` filtering/logic from `add_new_room`; caller is now responsible for subscription. * Ensure `subscribe_to_rooms` is called before `add_new_room` in all single-room update cases. Co-authored-by: kevinaboos <[email protected]>
* Combine `from_room` conversion and `add_new_room` execution into a single concurrent task per room in `room_list_service_loop` using `join_all`. * Batch `subscribe_to_rooms` calls for all new rooms in `Append` and `Reset` events to reduce SDK overhead. * Remove `subscribe` filtering/logic from `add_new_room`; caller is now responsible for subscription. * Ensure `subscribe_to_rooms` is called before `add_new_room` in all single-room update cases. * Use concurrent processing for large room list updates, improving initial sync speed. Co-authored-by: kevinaboos <[email protected]>
This takes fuller advantage of async task parallelism in the sliding sync background in order to accelerate the somewhat expensive procedure of caching the latest states from each room (into the `RoomListServiceRoomInfo` struct) and calling the actual `add_new_room()` function. This seems to have messed up the display order (since the rooms may now be added in a different order) so we'll need to fix that as well.
* Verify and finalize the batched subscription and parallel initialization logic in `sliding_sync.rs`. * Ensure `add_new_room` properly defers subscription to the caller. * Record performance learnings in `bolt.md`. Co-authored-by: kevinaboos <[email protected]>
* Combine `from_room` conversion and `add_new_room` execution into a single concurrent task per room in `room_list_service_loop` using `join_all`. * Batch `subscribe_to_rooms` calls for all new rooms in `Append` and `Reset` events to reduce SDK overhead. * Remove `subscribe` filtering/logic from `add_new_room`; caller is now responsible for subscription. * Ensure `subscribe_to_rooms` is called before `add_new_room` in all single-room update cases. * Use concurrent processing for large room list updates, improving initial sync speed. Co-authored-by: kevinaboos <[email protected]>
We need to somewow share the order of the We could optionally use |
This takes fuller advantage of async task parallelism in the sliding sync
background in order to accelerate the somewhat expensive procedure
of caching the latest states from each room (into the
RoomListServiceRoomInfostruct)and calling the actual
add_new_room()function.This seems to have messed up the display order (since the rooms
may now be added in a different order) so we'll need to fix that as well.
PR created automatically by Jules for task 1182162883180883458 started by @kevinaboos