-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
6e63c89
to
e891ec8
Compare
While I personally use only one team currently, I am looking forward to these changes 👍 |
@koxen This PR improves the performance for loading post and the perceived difference is more for channels than teams so, you might notice it as well :) With network throttle here is before and after comparison(Subjected to change though) |
i don't see at what point this code could improve performance of in-team channel switching. could you explain? |
import {joinChannel} from 'mattermost-redux/actions/channels'; | ||
import {getUser, getUserByUsername, getUserByEmail} from 'mattermost-redux/actions/users'; | ||
import {getTeamByName} from 'mattermost-redux/selectors/entities/teams'; | ||
import $ from 'jquery'; |
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.
please replace with pattern used here https://github.com/mattermost/mattermost-webapp/blob/master/components/permalink_view/permalink_view.jsx#L37
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.
This is WIP. Please dont review it yet!. It might be waste of time as it is subject for change. Not to worry it will not have jquery API's though.
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.
sorry for reviewing too early :) thanks for acknowledging the ban on adding new jquery code to project 🙅♂️
@koxen I posted about this in pre-release. Calling loadPosts API on a parent component give the perf benefit |
but these calls are async anyway? so if the channel is loaded in memory, it will be rendered instantly and loadPosts is called async to refresh data |
@koxen Yes, that is the reason in both the screenshots above I posted with a just loaded instance of the window. I shouldn't have steered the discussion on perf here, my bad. I might not even consider those changes for final PR though. |
258286c
to
2b77150
Compare
2b77150
to
61d249f
Compare
@sudheerDev Are there any next steps on this one? |
@jasonblais Just started working on this. Need to address the review comments and add test cases. This would require a thorough testing as well as it touches some critical parts of the app. Faster in the release cycle the better. |
Closing this in favor of #1352. @jasonblais I will be splitting this into a couple of PR's
|
@sudheerDev Sounds good 👍 |
Summary
Change channel view to be dependent on user/channel object async call.
Related Issue
Related ticket
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
make check-style
to check for style errors (required for all pull requests)make test
to ensure unit and component tests passed