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 problem - Pages are too slow to load #1327

Open
12 of 17 tasks
Didayolo opened this issue Feb 13, 2024 · 9 comments
Open
12 of 17 tasks

Performance problem - Pages are too slow to load #1327

Didayolo opened this issue Feb 13, 2024 · 9 comments
Assignees
Labels
Enhancement Feature suggestions and improvements P1 High priority, but NOT a current blocker

Comments

@Didayolo
Copy link
Member

Didayolo commented Feb 13, 2024

Codabench is too slow to load.

TODO

@Didayolo Didayolo added Enhancement Feature suggestions and improvements P1 High priority, but NOT a current blocker labels Feb 13, 2024
@ihsaan-ullah
Copy link
Collaborator

  • Optimize the code for loading a competition page

This needs proper planning as code cannot be optimized with current structure of the web page. It is a big update

@Didayolo
Copy link
Member Author

Still very slow after merging #1343

@bbearce
Copy link
Collaborator

bbearce commented Apr 1, 2024

Tested and think I have a fix:
Docs for automation to create large amounts of data

Essentially we used the CompetitionDetailSerializer to load competitions and I switched to CompetitionSerializerSimple. The detail one serializes phases and tasks and I believe that is time consuming. The Simple one has everything we need and it loads things faster on my local when I create lots of data. using selenium.

@Didayolo
Copy link
Member Author

Didayolo commented Apr 3, 2024

@bbearce #1376 is deployed on production, let's see if it helps!

@Didayolo Didayolo removed the P1 High priority, but NOT a current blocker label Apr 11, 2024
@Didayolo Didayolo added the P1 High priority, but NOT a current blocker label Oct 29, 2024
@Didayolo
Copy link
Member Author

Didayolo commented Oct 29, 2024

We need to make the loading of competition page lazy.

qs = qs.prefetch_related(

class SubmissionViewSet(ModelViewSet):

@ihsaan-ullah
Copy link
Collaborator

Screenshot 2024-11-03 at 2 58 55 PM

What do you think if we separate the admin procedures from the competition detail page? Similar to Edit page we can separate the submissions, participants etc in separate pages

@Didayolo
Copy link
Member Author

Didayolo commented Nov 4, 2024

That may be a good idea, especially for "Submissions" which can be heavy. However this will accelerate the loading only for organizers and admins.

@Didayolo
Copy link
Member Author

Didayolo commented Nov 5, 2024

We removed temporarily the submissions and participants counters to unblock the platform (#1646)

@ihsaan-ullah
Copy link
Collaborator

ihsaan-ullah commented Nov 7, 2024

Here is what we want to do:

Featured Competitions on home page (Solved by: #1678)

  1. Update the competition modal to have field/attribute is_featured that controls if a competition is featured or not
  2. Use this field in the home page to show real featured competitions

Submissions and Participants (Solved by: #1669)

  1. Put submissions and participants count in the competition model (update these counts when a new submission/ participant is added or a submission is deleted)
  2. For all current competitions fill these fields with correct values
  3. In the competition detail page, use these values in the UI (currently we show nothing)
  4. In the home page make the popular competiitons dynamic again using the new participants count field
  5. In the home page use the participants count field in featured competitions

Home page counters (Solved by: #1699)

  1. Update the counts somewhere in a file or in the db with a script that is run once a day
  2. Update home page to fetch the counts from the file/db to make them dynamic instead of hardcoded

Long term solution for competition details page

  • We should redo the apis used in the competition detail page to simplify and make them light
  • We should not fetch data unless we want to use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature suggestions and improvements P1 High priority, but NOT a current blocker
Projects
None yet
Development

No branches or pull requests

3 participants