Skip to content
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 performance when retrieving a project with collaborators #335

Merged
merged 5 commits into from
Dec 7, 2020

Conversation

Brend-Smits
Copy link
Member

Description

Add Collaborators by performing for each loop instead of joining tables. Joining tables by using Include() caused the query to take sometimes up to 10 times as long. This was an issue as it caused a drastic slow down when retrieving all projects, retrieving project detail, or when searching for projects.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project
  • I did not update API Controllers, if I did, I added/changed Postman tests
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I updated the changelog with an end-user readable description
  • I assigned this pull request to the correct project board to update the sprint board

Steps to Test or Reproduce

Outline the steps to test or reproduce the PR here.
These steps will be used during release testing.

  1. Go to the project overview page
  2. Check if it's snappy and more performance compared to on staging

Link to issue

Closes: #331

Joining the tables by using Include() caused the query to take sometimes up to 10 times as long. This was an issue as it caused drastic slow down when retrieving all projects, retrieving project detail or when searching for projects.
@Brend-Smits Brend-Smits added the priority Only assign this label if it's asked to assign this label label Dec 4, 2020
Copy link
Member

@waltersajtos waltersajtos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solution works, looks good to me

@Brend-Smits Brend-Smits requested review from RubenFricke and removed request for Maxvanhattum December 7, 2020 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority Only assign this label if it's asked to assign this label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance issues retrieving projects
3 participants