-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[IMPROVE] Open rooms quicker #13417
[IMPROVE] Open rooms quicker #13417
Conversation
I made some tests and seems there are some bugs (mainly with scrolls)... We already made some solutions like that, and we never get the perfect solution =/ |
2d0f5a8
to
b11d411
Compare
b11d411
to
6170d8e
Compare
@ggazzo fiz passar nos testes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like message edits are not working.
sometimes the last message sent stays gray (for the sender only)
there is a huge delay between sending the message (hitting enter) and the message showing on the list.
hey @rodrigok its not just about the tests... please read that comment:
I meant: 'I made some test with YOUR branch and the behavior its not good, scrolls are flickering'. and more we cant use the aproach using debounce/throttle if we have sequential code before wainting the render. like: https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-ui-utils/client/lib/RoomHistoryManager.js#L96 |
@sampaiodiego, its not a delay its self... its a "two debounced upserts", but the user feels like a delay =/ , if you keep sending messages with a rate < debounce time, you will never render the messages.
|
@rodrigok if you pay attention here: after load more messages, the scroll jumps to the "bottom"�. the reason I have explained above. |
@ggazzo your explanation was wrong, the debounce has nothing to do with the scroll behavior or the delay rendering the message, both was caused by the full recalculation of the entire list caused by the usage of the ReactiveVar instead of the cursor. I moved back the the cursor cuz it wasn't the main improvement at the time. The fail editing the message was caused by me using I did some profilings and found the items that are most expensive being the find for permissions that happens several times per message render duo to the action buttons logic and the translate logic that execute finds agains the subscription collection (that may be big for certain users). |
@rodrigok I gave up about discuss about use debounce or not (my explanation could not explain that specify bug, but prevent for many others), my final opinion (I dont think will change event with more chats): do not use debounce in some places, that case is one of them. but I liked the memoize usage to avoid permissions recallcs (I think we should create a rocketchat helper/package to do that) very smart the way you disabled the queries :) I am testing now |
* [IMPROVE] Open rooms quicker * Close observer on room destroy * Fix tests * Back to cursor and improve permission query * More improvements
* [IMPROVE] Open rooms quicker * Close observer on room destroy * Fix tests * Back to cursor and improve permission query * More improvements
…nto ldap-admin-groups * 'develop' of https://github.com/RocketChat/Rocket.Chat: (21 commits) Regression: Active room was not being marked (RocketChat#14276) Rename Cloud to Connectivity Services & split Apps in Apps and Marketplace (RocketChat#14211) LingoHub based on develop (RocketChat#14178) [IMPROVE] Replace livechat inquiry dialog with preview room (RocketChat#13986) Bump version to 0.74.3 Room loading improvements (RocketChat#13471) [FIX] Invalid condition on getting next livechat agent over REST API endpoint (RocketChat#13360) [IMPROVE] Open rooms quicker (RocketChat#13417) [FIX] "Test Desktop Notifications" not triggering a notification (RocketChat#13457) [FIX] Translated and incorrect i18n variables (RocketChat#13463) Regression: Remove console.log on email translations (RocketChat#13456) [FIX] Properly escape custom emoji names for pattern matching (RocketChat#13408) [FIX] Not translated emails (RocketChat#13452) Added missing package dependency (RocketChat#13437) Update Russian localization (RocketChat#13244) [IMPROVE] Allow configure Prometheus port per process via Env Var (RocketChat#13436) [IMPROVE] Add API option "permissionsRequired" (RocketChat#13430) [FIX] Several Problems on HipChat Importer (RocketChat#13336) Add the missing uniqueId to the push notifications (RocketChat#13423) [FIX] Notify private settings changes even on public settings changed (RocketChat#13369) ...
Before
After