Coder Social home page Coder Social logo

Comments (6)

m1k1o avatar m1k1o commented on June 11, 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.

from neko.

SpiderSuave avatar SpiderSuave commented on June 11, 2024

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.

from neko.

m1k1o avatar m1k1o commented on June 11, 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.

from neko.

mbattista avatar mbattista commented on June 11, 2024

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.

from neko.

SpiderSuave avatar SpiderSuave commented on June 11, 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.

from neko.

SpiderSuave avatar SpiderSuave commented on June 11, 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.

from neko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.