Skip to content

Performance problem - Pages are too slow to load #1327

Closed

Description

@Didayolo

Codabench is too slow to load.

TODO

Activity

  1. added
    Enhancement
    P1
    on Feb 13, 2024
  2. ihsaan-ullah commented on Feb 20, 2024

    @ihsaan-ullah
    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

  3. Didayolo commented on Feb 22, 2024

    @Didayolo
    MemberAuthor

    Still very slow after merging #1343

  4. bbearce commented on Apr 1, 2024

    @bbearce
    Collaborator

    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.

  5. Didayolo commented on Apr 3, 2024

    @Didayolo
    MemberAuthor

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

  6. removed
    P1
    on Apr 11, 2024
  7. added
    P1
    on Oct 29, 2024
  8. Didayolo commented on Oct 29, 2024

    @Didayolo
    MemberAuthor

    We need to make the loading of competition page lazy.

    qs = qs.prefetch_related(

    class SubmissionViewSet(ModelViewSet):

  9. ihsaan-ullah commented on Nov 3, 2024

    @ihsaan-ullah
    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

  10. Didayolo commented on Nov 4, 2024

    @Didayolo
    MemberAuthor

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

  11. Didayolo commented on Nov 5, 2024

    @Didayolo
    MemberAuthor

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

  12. ihsaan-ullah commented on Nov 7, 2024

    @ihsaan-ullah
    Collaborator

    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
  13. Didayolo commented on Mar 21, 2025

    @Didayolo
    MemberAuthor

    @ihsaan-ullah Just a quick note to remind ourselves that the submission counter is still not re-implemented on the leaderboard (always showing "1 entry")

  14. ObadaS commented on Apr 1, 2025

    @ObadaS
    Collaborator

    We have decided to remove the column showing the number of entries in the leaderboard (which we disabled a while ago because of the performance issues it caused)

  15. ihsaan-ullah commented on Jul 5, 2025

    @ihsaan-ullah
    Collaborator

    I think we can close this issue because the remaining problems are big updates and we will cover them in the future anyway.

  16. Didayolo commented on Jul 8, 2025

    @Didayolo
    MemberAuthor

    OK, I close this issue @ihsaan-ullah.

    I am not sure if adding back "entries" on the leaderboard is a big update? Or maybe we simply remove the column so at least it is not wrong? (always showing 1 entry)

    EDIT: just saw your PR #1912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementP1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions