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

Performance of GetAllProjects with pagination #394

Closed
niraymak opened this issue Mar 9, 2021 · 4 comments
Closed

Performance of GetAllProjects with pagination #394

niraymak opened this issue Mar 9, 2021 · 4 comments
Assignees
Labels
bug Something isn't working priority Only assign this label if it's asked to assign this label

Comments

@niraymak
Copy link
Member

niraymak commented Mar 9, 2021

Describe the bug
Using the pagination in the project overview page is very slow.

To Reproduce
Steps to reproduce the behavior:

  1. https://staging.dex.software/project/overview
  2. Page 2 at the bottom of the page.
  3. Use Chrome DevTools to track performance of query.

Expected behavior
Should be way faster.

Screenshots
1.6s to load the project overview page 2.
image

Production URL
https://staging.dex.software/project/overview

Additional context
It looks like awesome dot net has something to do with it. https://staging.dex.software/project/details/1-awesome-dotnet

However, this project slows the performance on staging but not on production.

@niraymak niraymak added bug Something isn't working priority Only assign this label if it's asked to assign this label labels Mar 9, 2021
@niraymak
Copy link
Member Author

niraymak commented Mar 9, 2021

Tested on my local machine on with develop branch.
Only the first time it was >1000ms. After that it was around 200ms.

Switched amountOnPage parameters. https://api.staging.dex.software/api/project?page=1&amountOnPage=22&sortBy=updated&sortDirection=desc
I did increase by one till I saw the performance dropping and mentioned that it dropped when I increased from 21 to 22. Look like it has something to do with this project: https://staging.dex.software/project/details/1-awesome-dotnet

@niraymak niraymak self-assigned this Mar 9, 2021
@niraymak
Copy link
Member Author

niraymak commented Mar 9, 2021

Tested on my local machine on with develop branch.
Only the first time it was >1000ms. After that it was around 200ms.

Switched amountOnPage parameters. https://api.staging.dex.software/api/project?page=1&amountOnPage=22&sortBy=updated&sortDirection=desc
I did increase by one till I saw the performance dropping and mentioned that it dropped when I increased from 21 to 22. Look like it has something to do with this project: https://staging.dex.software/project/details/1-awesome-dotnet

The database in production has the same project. https://dex.software/project/details/85-awesome-dotnet
This project is included in the following query: https://api.dex.software/api/project?page=2&amountOnPage=12&sortBy=updated&sortDirection=desc and is much faster.

@niraymak
Copy link
Member Author

niraymak commented Mar 9, 2021

Applied this https://stackoverflow.com/a/40183279 to our GetAllWithUsersAndCollaboratorsAsync method in the project repo.

Performance increased from 850-1000ms to 200-350ms.

@niraymak
Copy link
Member Author

niraymak commented Mar 9, 2021

Applied this https://stackoverflow.com/a/40183279 to our GetAllWithUsersAndCollaboratorsAsync method in the project repo.

Performance increased from 850-1000ms to 200-350ms.

After deleting awesome dot net the performance even increased to 100-200ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Only assign this label if it's asked to assign this label
Projects
None yet
Development

No branches or pull requests

1 participant