RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.38k stars 10.49k forks source link

Keep removing old messages from the DOM, until user scrolls up again. #31

Open engelgabriel opened 9 years ago

engelgabriel commented 9 years ago

After a while with Rocket.Chat open the messages you receive are kept on DOM, which start lagging the whole UI.

We need to use something like https://github.com/bvaughn/react-virtualized or https://github.com/clauderic/react-tiny-virtual-list so we keep the DOM small as possible.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

rodrigok commented 9 years ago

Is it still necessary?

engelgabriel commented 9 years ago

I think so.. not that important, but nice to have to keep performance as good as possible, specially on mobile, or when you leave the app open for weeks.

geekgonecrazy commented 9 years ago

I need to do some more checking.. But I think this might be causing some performance issues on the Electron / Cordova apps.

engelgabriel commented 8 years ago

This is becoming more important, see https://github.com/RocketChat/Rocket.Chat/issues/2505

engelgabriel commented 8 years ago

This is still necessary

lucasvanhalst commented 8 years ago

Yeah it would be great, after a few hundred messages it gets really unresponsive and is quite annoying to use

Sing-Li commented 8 years ago

wargame and others on #support are still experiencing and dealing with this daily

engelgabriel commented 7 years ago

this is related https://github.com/RocketChat/Rocket.Chat/issues/5111

shtefcs commented 7 years ago

Honestly I am surprised that this is a still issue.

My RC instance freeze when I search for message and jump to it .

It past 2 years from the issue report, i think you should really work on that guys.

lucasvanhalst commented 7 years ago

This should be top priority if you ask me... It becomes unusable after it has been open for a few hours.

Lemmmy commented 7 years ago

I've noticed that this issue is much more prominent than Firefox than Chrome - in Chrome it is almost entirely a non-issue.

Is there any effort to put forward an implementation of this?

Are you looking to keep the scrollbar consistent when loading/unloading messages?

If so, I believe the best way would be to keep a certain amount of messages beyond the viewport loaded, and then to keep the scrollbar consistent, keep track of the height of all messages that have ever been loaded, and put two dummy elements above and below the messages which you update the height on.

There is a library called clusterize.js which uses a technique similar to this, however, it should be noted this specific library does not work with variable height items. However, that doesn't mean it's impossible to implement with a similar method.

docsncode commented 6 years ago

@rodrigok is this even still relevant with all our new UI updates?

sampaiodiego commented 6 years ago

this is still relevant @SeanPackham . new UI elements haven't touched messages yet, but still I don't think we'll fix this until we change the whole UI to React.

docsncode commented 6 years ago

Thanks @sampaiodiego, could we add some more detail to the issue saying it would be fixed when we move to React and mention a milestone?

sampaiodiego commented 6 years ago

@karlprieb any plans to start rewriting the UI using React?

karlprieb commented 6 years ago

We plan to start the rewriting in the next month, but can take months to finish that.

Vringe commented 2 years ago

I think this is still an issue. After updating from 3.12.7 to 3.18.3 it got much worse. As soon as I scroll up about 2 weeks in a channel, reopening that channel takes about 5-10 seconds depending on how many other channels there are around. We have multiple users complaining about that since the update. It does not matter which client you use (Webapp or Electron Client).

danel1 commented 2 years ago

Looks like we're facing the same issue as @Vringe described. Any Update or workaround on this @engelgabriel @rodrigok @sampaiodiego ? This has a quite critical performance / usability impact for most of our users.

hugocostadev commented 1 year ago

After the Room Rewrite to React and Blaze removal in 6.x Release this is not happening anymore. Closing it

ggazzo commented 1 year ago

After the Room Rewrite to React and Blaze removal in 6.x Release this is not happening anymore. Closing it

Actually this is not right. We are not using virtual list in main chat yet, although we're very close to being able to do that.

If you stay in a room and get a lot of messages, you'll notice that all items are still rendered on the screen, causing a performance issue.