nostrum icon indicating copy to clipboard operation
nostrum copied to clipboard

Message cache

Open Th3-M4jor opened this issue 1 year ago • 1 comments

This is still a work in progress, but is the beginnings of a message cache for Nostrum.

Still needs to be hooked into the event handler and I need to test it.

Th3-M4jor avatar May 13 '24 02:05 Th3-M4jor

Thanks, this looks solid already! There is one problem with QLC that I wonder if we can contribute a smart fix for upstream: qlc:keysort will always sort the entire table (as a list) in memory, so it's not exactly efficient on big tables. For large message caches this would mean a temporary bloating of memory on every cull. For the other "sorted by age" queries I think it's fine. Should we maybe change the cull of old messages somehow differently... I'm thinking.. maybe we can memorize the oldest message somehow, but then we have to somehow update it - how would that work - or we need to, hm, I wonder

jchristgit avatar May 13 '24 05:05 jchristgit

Still need to do some real testing of it myself but other than that, this should be ready.

Do note that there are breaking changes that come with this

Th3-M4jor avatar May 18 '24 21:05 Th3-M4jor

Thanks!

jchristgit avatar May 26 '24 06:05 jchristgit