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

Made the get all projects function better #437

Merged
merged 2 commits into from
May 18, 2021

Conversation

TimSnoek123
Copy link
Contributor

Description

Updated the get all projects repository function, performance is now improved for:

500 projects: 1600ms to 360ms.
30 projects: 250ms to 165ms

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

To test just call the Project [HttpGet] endpoint to get all projects

Link to issue

Closes: #436

@TimSnoek123 TimSnoek123 added the bug Something isn't working label May 6, 2021
@TimSnoek123 TimSnoek123 self-assigned this May 6, 2021
@Maxvanhattum
Copy link
Contributor

Hey @TimSnoek123 , I thought @niraymak changed that getall method to those .loads() because he said it improved the performance. Have you and he compared response times of these different ways of retrieving the projects? Maybe you two can talk about this?

@TimSnoek123
Copy link
Contributor Author

I will test that tomorrow, .load() shouldn't improve the response time from what I know about it, but if it does then I will add that part back. Still the time should still be improved, because that function did some weird things :). @Maxvanhattum

@RubenFricke RubenFricke requested a review from niraymak May 10, 2021 12:16
Copy link
Member

@niraymak niraymak left a comment

Choose a reason for hiding this comment

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

Great job! I tested it with the frontend, everything seems to work fine and much faster.
Also tested the .Load() and it did make the endpoint slower, so I think we should leave it like this! 🥇

Copy link
Contributor

@Maxvanhattum Maxvanhattum left a comment

Choose a reason for hiding this comment

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

Nice work, this is indeed the cleaner way to code it and you showed that it improved response times!

@TimSnoek123 TimSnoek123 merged commit bfc67b5 into develop May 18, 2021
@TimSnoek123 TimSnoek123 deleted the bug/436-get-all-projects-performance branch May 18, 2021 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get All Projects performance
3 participants