0
0
Fork 0
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:
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 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;