mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01:00
modules/client/sync: Add prefetching for some polylog sync iterations.
This commit is contained in:
parent
91dff38a57
commit
3be110d6ca
1 changed files with 11 additions and 0 deletions
|
@ -797,6 +797,15 @@ ircd::m::sync::polylog::room_state(shortpoll &sp,
|
|||
room, &fopts
|
||||
};
|
||||
|
||||
state.for_each([&]
|
||||
(const m::event::idx &event_idx)
|
||||
{
|
||||
if(event_idx < sp.since || event_idx >= sp.current)
|
||||
return;
|
||||
|
||||
m::prefetch(event_idx, fopts);
|
||||
});
|
||||
|
||||
state.for_each([&]
|
||||
(const m::event &event)
|
||||
{
|
||||
|
@ -892,6 +901,8 @@ ircd::m::sync::polylog::room_timeline_events(shortpoll &sp,
|
|||
|
||||
if(it.event_idx() >= sp.current)
|
||||
break;
|
||||
|
||||
m::prefetch(it.event_idx(), fopts);
|
||||
}
|
||||
|
||||
limited = i >= 10;
|
||||
|
|
Loading…
Add table
Reference in a new issue