URGENT - Optimize Home page: Featured and popular comps and counters made static #1649
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1. Home page Competitions are static now
Now you will see specific competitions in popular and featured competitions as a temporary fix to not use count participants. We should put this back as a dynamic feature when we optimize the code.
Solves: part of #1648 -> Home page popular and featured competitions
TODO: show the competitions again after fixing the queries
2. Home page static counters
Now we will see static number of comps, users and submissions to unblock users from using codabench. We want to update these numbers in a db or a file once a day and then fetch from there to not run expensive queries all the time when someone loads the home page
Solves: part of #1648 -> Global counters
TODO: show real counters from file/db when implemented
We should add the TODOs to #1647