From eed446b9660a18c0420727d67a14b37abe66ffd5 Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 30 Nov 2026 10:47:33 -0500 Subject: [PATCH] Fetch leaderboard submission scores on demand Every submission's full score JSON (ROC curves included) was inlined into the leaderboard HTML, making the milk10k page 7MB and the 2019 page 5MB uncompressed. Slow clients kept sync gunicorn workers pinned in sendall past the 30s timeout. The page now only renders the table, and the details row fetches /submission//score/ when it is first expanded. The endpoint applies the same visibility rules as the leaderboard query. --- stade/core/templates/leaderboards.html | 37 +++++++++++------------ stade/core/tests/factories.py | 4 +++ stade/core/tests/test_leaderboard.py | 41 ++++++++++++++++++++++++++ stade/core/urls.py | 1 + stade/core/views.py | 33 +++++++++++++-------- 5 files changed, 83 insertions(+), 33 deletions(-) diff --git a/stade/core/templates/leaderboards.html b/stade/core/templates/leaderboards.html index 3a589179..5fe76b1c 100644 --- a/stade/core/templates/leaderboards.html +++ b/stade/core/templates/leaderboards.html @@ -128,10 +128,11 @@

{{ challenge.name }} Leaderbo {% endif %} - +
{% if active_task.type == 'classification' %} +
Loading scores...