chatterino2
chatterino2 copied to clipboard
Change the message limit/amount/count
@fourtf Do you remember what you actually wanted to do here? I don't really understand what you want to do here 😆
It's changing the max amount of messages currently being able to be held in a channel before the oldest ones get removed, currently it's 1000 messages I think.
I tried to see if I can implement this myself, but for some reason, it crashes if I set a smaller limit than 1000 😕
I tried to see if I can implement this myself, but for some reason, it crashes if I set a smaller limit than 1000 confused
I just hacked around this and when I set the limit to less than 1000 (tried 900, 600 and even 30) it all worked - problem is that loading recent messages might've been the crash cause (see #1421). I experienced no crashes when I've set the limit to 30 and opened Chatterino with just 1 chat where there were like 2-3 recent messages.
My conclusion is that once we find an easy way around #1421, where trying to load amount of recent messages that'd overflow instance of LimitedQueue
it's possible to make this thing here a setting and close the issue.
Or alternatively, we'd only make this new potential setting accepting 1000 and higher only.
Yes, this should not be implemented by loading all the history to memory, that will inevitably blow up if the data is big enough. This should be implemented by having Qt lazy load the data in chunks as it needs it.
I have not looked into the code yet, so I don't know what is currently being used as data provider, but this would require a Qt data model to be used.
@FFY00 if you're talking about lazy loading from the recent-messages API you're out of luck. There's no way to grab recent messages from a single point in time. If we were to store the raw IRC messages and then lazy load that it could be a solution. In the end you're still storing data in memory.
If this feature was implemented I would expect the message limit to be passed to the recent-messages API so we're not fetching more messages than we need. Would half-solve the crash experienced.
Yes, a proper past history implementation, which is what brought me here but now I realize it was not explicit in this issue, would be backed by some sort of on-disk backend, a file would be simplest.
This is definitely not trivial to implement, but shouldn't be that hard, just takes some work.
This was implemented in #3811
The following 2 settings can be toggled (in 2.4.0)
to increase/decrease the total messages in chat & the usercard.
-
Split message scrollback limit (requires restart):
-
Usercard scrollback limit (requires restart):
As of right now there's no way to bump the amount of recent-messages loaded, but we confirmed fixing the crash when more than 1000 messages are loaded in #1421
Fixed in #3811