Hi,
I debugged space rooms not loading in my case and I found an issue with _throttle in this case for the async stream:
|
Task { [weak self] in |
|
for await state in paginateListener._throttle(for: .milliseconds(500)) { |
|
self?.paginationState = state |
|
} |
|
} |
It seems _throttle emits the first event right away and buffers elements arriving within the next 500ms. The problem seems to be that those are only flushed if now another element arrives or the base sequence finishes. In my case this reliably caused the loader to get stuck.
To confirm I temporarily removed the throttle there and also in LiveSpaceService.swift. I am not sure about the proper fix. I think the listener already receives batched updates and this probably happens infrequently, so maybe no throttle is needed?
edit: Maybe also worth looking into other places where _throttle is used?
edit2: In particular Mactrix/Models/LiveTimeline.swift, here I also saw partial timelines.
Hi,
I debugged space rooms not loading in my case and I found an issue with
_throttlein this case for the async stream:mactrix/Mactrix/Models/LiveSpaceRoomList.swift
Lines 95 to 99 in 5b846c0
It seems
_throttleemits the first event right away and buffers elements arriving within the next 500ms. The problem seems to be that those are only flushed if now another element arrives or the base sequence finishes. In my case this reliably caused the loader to get stuck.To confirm I temporarily removed the throttle there and also in
LiveSpaceService.swift. I am not sure about the proper fix. I think the listener already receives batched updates and this probably happens infrequently, so maybe no throttle is needed?edit: Maybe also worth looking into other places where _throttle is used?
edit2: In particular
Mactrix/Models/LiveTimeline.swift, here I also saw partial timelines.