chatterino2 icon indicating copy to clipboard operation
chatterino2 copied to clipboard

Add ability to specify number of messages in channel

Open goldbattle opened this issue 2 years ago • 6 comments

Pull request checklist:

  • [x] CHANGELOG.md was updated, if applicable

Description

Currently the problem is that for fast chats, the user popup log history doesn't provide much information since only 1000 messages are kept for each channel (. This of course makes the memory of the program very small, but basically only allows the logs to have the most recent message from a user (instead of messages in the past 5 minutes).

This adds two params to configure how many messages are displayed on-screen ChannelView and how many are kept in memory for use in the chat log / searching Channel.

image

Use of the shared pointer is not ideal, if there is a better way let me know. I didn't dig deep but it errors on me just re-constructing the variable in the constructor (is there a unique pointer someplace in the LimitedQueue? not sure..).

goldbattle avatar Jun 10 '22 03:06 goldbattle

@goldbattle Have you tested this functionality with more than 1000 messages in a channel? I suspect it would cause crashes before #3798 has been merged in

pajlada avatar Jun 10 '22 13:06 pajlada

Seems interesting, just wondering how global search will like 8000+ message look-back in every channel.

I suspect it would cause crashes

Seems to be fine, tested with 1150 messages being render-able, seems the original issue is just loading all of them at once, 800 message history+350 new messages (and 1150 new is fine also).

Felanbird avatar Jun 10 '22 15:06 Felanbird

I tested up to 5k messages for logs with 2k on screen. Works as expected, but the crash with inserting a lot of historical messages is still an issue in this PR. I saw https://github.com/Chatterino/chatterino2/issues/1421 a couple times when I ran the program.

EDIT: I tested searching and it works as expected and is responsive with 6k in the history.

goldbattle avatar Jun 10 '22 17:06 goldbattle

Any updates on what is blocking this?

goldbattle avatar Sep 19 '22 16:09 goldbattle

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Sep 19 '22 16:09 github-actions[bot]

Any updates on what is blocking this?

Code looks fine, I need to test this out a bit

pajlada avatar Sep 19 '22 23:09 pajlada

Just want to re-ping on this one. Don't want it to get too far behind and have to keep it up to master. Let me know what I need to do.

goldbattle avatar Nov 09 '22 20:11 goldbattle

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Nov 09 '22 21:11 github-actions[bot]

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Nov 12 '22 12:11 github-actions[bot]

Looks good to me. I would still recommend that the default chat log is for usercard is increased Right now usercard log history isn't very helpful in streams > 10k viewers. But I am good either way, thanks for the cleanup.

goldbattle avatar Nov 12 '22 14:11 goldbattle

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] avatar Nov 12 '22 15:11 github-actions[bot]