-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
/rest/v1/project_directory performance #4725
Labels
Comments
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
The projects don't change often, so we should be able to cache them for a while. Additionally, every hour we will regenerate their cached values (take ~7m right now). So the quick fix is two-fold: - cache the entire result and keep for an hour - regenerate per project cache every hour Once the page cache expires, queries should take ~10-20 seconds, but only once until the next hour. #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
The projects don't change often, so we should be able to cache them for a while. Additionally, every hour we will regenerate their cached values (take ~7m right now). So the quick fix is two-fold: - cache the entire result and keep for an hour - regenerate per project cache every hour Once the page cache expires, queries should take ~10-20 seconds, but only once until the next hour. #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
The projects don't change often, so we should be able to cache them for a while. Additionally, every hour we will regenerate their cached values (take ~7m right now). So the quick fix is two-fold: - cache the entire result and keep for an hour - regenerate per project cache every hour Once the page cache expires, queries should take ~10-20 seconds, but only once until the next hour. #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
For some reason it takes a whole lot of time to reverse an URL. Even the example for `cached_property` uses `absolute_url` as an example. #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
Instead of relying on django to make deferred queries, we make all queries ourselves, build the cache, and use it. It's per project ID for faster access. Additionally, `url` is not required anymore as the UI builds the url to the project now #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
The request takes way too long when the cache is broken. On production, it never actually is able to fill the cache. To give us time to work on a solution, this limits the number of projects in the directory from #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
Instead of relying on django to make deferred queries, we make all queries ourselves, build the cache, and use it. It's per project ID for faster access. Additionally, `url` is not required anymore as the UI builds the url to the project now #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
The request takes way too long when the cache is broken. On production, it never actually is able to fill the cache. To give us time to work on a solution, this limits the number of projects in the directory from #4725: /rest/v1/project_directory performance
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
…_dir-to-10 [#4725] workaround: Ultra hacky limitation to speed up project_dir
MichaelAkvo
added a commit
that referenced
this issue
Dec 9, 2021
Instead of relying on django to make deferred queries, we make all queries ourselves, build the cache, and use it. It's per project ID for faster access. Additionally, `url` is not required anymore as the UI builds the url to the project now #4725: /rest/v1/project_directory performance
zuhdil
added a commit
that referenced
this issue
Dec 10, 2021
- Add fields that should not be deffered
zuhdil
added a commit
that referenced
this issue
Dec 10, 2021
zuhdil
added a commit
that referenced
this issue
Dec 10, 2021
[#4725] Improve project directory performance
zuhdil
added a commit
that referenced
this issue
Dec 11, 2021
zuhdil
added a commit
that referenced
this issue
Dec 11, 2021
[#4725] Project directory performance improvement part 2
The problem in production seems to have come from It might still be possible to further improve performance by using A rework of the landing page is coming, so this might not be relevant anymore. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The endpoint is unbelievably slow and incredibly large.
Basically 9k projects are selected in production and for each of them a bunch more requests are made.
The text was updated successfully, but these errors were encountered: