Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typing lag in chat + option to clear bans without restarting room #356

Open
SpiderSuave opened this issue Jan 6, 2024 · 6 comments
Open
Labels
enhancement New feature or request

Comments

@SpiderSuave
Copy link

SpiderSuave commented Jan 6, 2024

Hello and as always thank you for your work.

I've noticed a typing lag problem that Neko has always had, where when the chatroom gets full of too much text, the user's typing starts to lag and they must refresh their web page to fix the problem.

Also an option to clear bans without restarting the room would be awesome. Or perhaps someone could let me know of a way to do this from the server side where Neko is running.

Thanks again.

@m1k1o
Copy link
Owner

m1k1o commented Jan 7, 2024

I wonder how many chat messages are you talking about, i never saw such issue. But you are right, those messages are never deleted until the page is refreshed.

@m1k1o m1k1o added the enhancement New feature or request label Jan 7, 2024
@SpiderSuave
Copy link
Author

When there's enough scrollable text in the chatroom filling roughly about three screens, the lag begins, a little at first and it gets progressively worse, like there's some kind of memory leak happening.

It happens to me and I've confirmed it with others when I host watchparties, and it doesn't seem to make a difference how many people are in the room, whether it's one or a dozen or more people.

Thank you for any help on this.

@m1k1o
Copy link
Owner

m1k1o commented Jan 8, 2024

Yeah, that lag must be only on the client side because no chat is stored or processed on the server. We could remove old messages, but that would be inconvenient for people that want to browse session history. Or we could only display messages that are actually visible in user's viewport and save others to some variable. But that is quite a lot of work.

@mbattista
Copy link
Contributor

I will try to wrap the chat into a virtual scroller instead of a v-for over history. This should fix it, but would add a dependency.

@SpiderSuave
Copy link
Author

SpiderSuave commented Jan 12, 2024

Thank you, or maybe just an option to set a limit for text history that clients can scroll through, unless that's what you mean. It's a problem caused on the client side yes, since anyone simply reloading the page fixes it for them until text for them accumulates again to the point of lag. As always, much appreciated. I love this app and love to see it improved and you guys are great.

@SpiderSuave
Copy link
Author

SpiderSuave commented Jan 21, 2024

Just to note, I counted the lines by typing a number on each line followed by letter a-z, and it's not a matter of total text, but of number of chat messages sent, number of entries, and it's about at 220 that the lag starts to become noticeable, or at least noticeable enough.

In other words, at even just a single character per chat message, at around 220 the lag will be there, but if I paste 10 lines per chat message, about 10 times more text can be in the chatroom before lag starts getting noticeable.

Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants