0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-26 13:58:18 +02:00

modules/client/sync: Add prefetching for some polylog sync iterations.

This commit is contained in:
Jason Volk 2018-09-01 05:10:28 -07:00
parent 91dff38a57
commit 3be110d6ca

View file

@ -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;