You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://virtuoso.dev/#performance - Performance is impacted by dynamic heights, widths and a large viewport. In our case, our message items span across 80-90% of the screen + all our content is dynamic (markdown, images, files). There's no way for any virtualization engine to figure out the heights of these items without actually mounting them.
We need to revert Virtuoso and bring back our simple, yet humble, chat interface.
The text was updated successfully, but these errors were encountered:
We definitely need to remove Virtuoso. This is the scrolling performance of a chat with a large number of messages with Virtuoso on a MBP Pro with M2 Pro:
With.Virtuoso.mov
If we remove Virtuoso, we get back the performance (see below), but lose out on a few features and the initial mount takes a lot of time.
Without.Virtuoso.mov
Virtuoso is being used for more than just virtualization in the app:
Scroll to a message (from reply click and from saved messages) is dependent on Virtuoso. This can be fixed with generic document scrolling functions as done on the mobile app.
Virtuoso is also keeping the content scrolled down (when new messages are loaded). This can also be done with document scrolling.
The 2nd video has nice scroll performance, but when getting back to the page, the initial mount is painstakingly slow without Virtuoso. This is because of multiple reasons: poor component architecture, too many re-renders/computations and the most obvious - rendering too many messages.
Removing Virtuoso would need us to implement the following:
Change the way "scroll to message" works - both when clicking on a reply message and also on a saved message. This would also mean we need to do Refactor Reply message box on web app #495 first.
After a careful regression test, I figured out that Virtuoso has been the main reason why the chat interface lags so much.
We need to revert Virtuoso and bring back our simple, yet humble, chat interface.
The text was updated successfully, but these errors were encountered: