-
Notifications
You must be signed in to change notification settings - Fork 86
Fix performance issues #1122
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
Fix performance issues #1122
Conversation
3cbd781 to
5dc0bd9
Compare
begedin
left a comment
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 a great change overall.
I especially like the move of preloads to controllers. It's more explicit and something that's generally recommended in phoenix.
Just a potential concern with removing tasks from a project, but should be fine otherwise.
| "type" => "task" | ||
| } | ||
| ] | ||
| } |
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.
Did you check how this works with ember. Do we access project.tasks on the client end anywhere? I seem to remember this missing causing problems for us, but the problem may have gone away due to introducing task lists.
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 breaking things in Ember. Even worse, I wanted to be able to specify the tasks index to load only open tasks by default, but this appears to break functionality if the tasks are not included on the project.
There's some work to be done here figuring out the best way forward.
|
Do you agree with breaking out the preloads into the model @begedin? |
|
@joshsmith If you mean, into the controller, then yeah, I absolutely do. Can't find a link for it, but pretty sure that's the recommended approach for phoenix |
|
Seconds later we agreed the view is a good spot. |
74c0fd7 to
393f3a1
Compare
|
AuthToken
Category
Comment
DonationGoal:
GithubAppInstallation
GithubComment
GithubEvent
GithubIssue
GithubPullRequest
GithubRepo
OrganizationGithubAppInstallation
OrgnanizationInvite
Organization
Preview
Project has:
StripeX:
StripeConnectSubscription, StripePlatformCustomer
StripeExternalAccount
StripeFileUpload
Task
TaskList has:
User:
|
|
Additionally, it doesn't look like we sort tasks by order, which is maybe a lost opportunity since that's expected on the front-end. |
|
Should
|
- Remove preloads from views and write explicitly in controllers - Reduce id filter repetition - Ensure id query filters are run on every controller that has an index action - Add missing indexes
e820487 to
bd93e86
Compare
I think no. Consider this case. On my github account, I have 2 repos, intended to be two separate projects in two organizations. I install the CC app once and then from each project's installation tab, can see that installation and connect it to that organization. It's a rare case, but I think it is possible.
Probably remainder from before extracting |
Can you add an issue for this? |
begedin
left a comment
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 good. I see you decided to keep preloads in the controller. Works for me and makes sense, considering that's where they are used from.
What's in this PR?
Some fixes for API performance issues.