0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

modules/client/rooms/messages: Abandon prefetching in the messages handler.

Aborted due to collisions and stalls. Note that messages are already prefetched
by the breadcrumb_rooms handler on room change.
This commit is contained in:
Jason Volk 2019-09-18 13:09:19 -07:00
parent 1d449ed134
commit 6ed0db3274

View file

@ -36,13 +36,6 @@ max_filter_miss
{ "default", 2048L },
};
conf::item<size_t>
prefetch_max
{
{ "name", "ircd.client.rooms.messages.prefetch.max" },
{ "default", 24L },
};
log::log
messages_log
{
@ -132,26 +125,6 @@ get__messages(client &client,
top, "chunk"
};
const auto &max_prefetch
{
std::min(size_t(page.limit), size_t(prefetch_max))
};
size_t prefetch{0};
if((false) && max_prefetch)
{
m::room::events pf
{
room
};
for(; pf && prefetch < max_prefetch; page.dir == 'b'? --pf : ++pf)
prefetch += pf.prefetch();
if(prefetch > 0)
ctx::yield();
}
size_t hit{0}, miss{0};
m::room::events it
{