mirror of
https://github.com/matrix-construct/construct
synced 2024-09-28 19:58:53 +02: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
|
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([&]
|
state.for_each([&]
|
||||||
(const m::event &event)
|
(const m::event &event)
|
||||||
{
|
{
|
||||||
|
@ -892,6 +901,8 @@ ircd::m::sync::polylog::room_timeline_events(shortpoll &sp,
|
||||||
|
|
||||||
if(it.event_idx() >= sp.current)
|
if(it.event_idx() >= sp.current)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
m::prefetch(it.event_idx(), fopts);
|
||||||
}
|
}
|
||||||
|
|
||||||
limited = i >= 10;
|
limited = i >= 10;
|
||||||
|
|
Loading…
Reference in a new issue