You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Listing or downloading the entries of a large round times out #640
For large rounds, listing or downloading the entries fails: both GET /v1/admin/round/<id>/entries and /entries/download are killed by gunicorn's 30 s timeout.
Reproduce (montage-dev, 2026-10-02)
A round with 15,676 entries (Images from Wiki Loves Monuments 2026 in Russia): both requests ended after 30.0–30.5 s with SystemExit('1') from handle_abort in the exception log. A round with 427 entries downloads in well under a second.
Cause [concluded from the code]
get_round_entries() loads every RoundEntry, and to_export_dict() then lazily loads each entry's Entry and RoundSource: several queries per row. Same on master. Not memory-bound here, but time-bound.
Possible fix
One query that joins round_entries, entries and round_sources and streams the CSV.
Written with Claude (Claude Code) on behalf of @lgelauff.
Fixed in #659 (merged as 8ac4cfd): the entries list and CSV download now run two queries per request instead of two per entry (perf/round-entries-export-640). File-list rounds still repeat their source params in every row (#639).
Activity
mahmoud commentedon Oct 10, 2026
Fixed in #659 (merged as 8ac4cfd): the entries list and CSV download now run two queries per request instead of two per entry (perf/round-entries-export-640). File-list rounds still repeat their source params in every row (#639).