chatterino2 icon indicating copy to clipboard operation
chatterino2 copied to clipboard

Change the message limit/amount/count

Open fourtf opened this issue 8 years ago • 8 comments

fourtf avatar Feb 06 '17 13:02 fourtf

@fourtf Do you remember what you actually wanted to do here? I don't really understand what you want to do here 😆

ALazyMeme avatar Mar 29 '20 01:03 ALazyMeme

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.

apa420 avatar Mar 29 '20 12:03 apa420

I tried to see if I can implement this myself, but for some reason, it crashes if I set a smaller limit than 1000 😕

revolter avatar Feb 07 '21 15:02 revolter

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.

zneix avatar Jun 28 '21 20:06 zneix

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 avatar Apr 20 '22 22:04 FFY00

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

jupjohn avatar Apr 20 '22 22:04 jupjohn

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.

FFY00 avatar Apr 20 '22 22:04 FFY00

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

Felanbird avatar Nov 22 '22 04:11 Felanbird

Fixed in #3811

pajlada avatar Nov 22 '22 08:11 pajlada