sio2project / oioioi

GNU General Public License v3.0
160 stars 70 forks source link

/participant_data/ too many queries #345

Open metenn opened 3 months ago

metenn commented 3 months ago

With 7 models referencing back to the Participant model and no prefetch_related()/select_related(), participants_data view produces a ton of queries, which is slow.

A-dead-pixel commented 3 months ago

Is comprehensively optimizing oioioi in the area of db queries planned for the near future (this semester)? If so, then I have some patches, which greatly improve the performance for the some of the basic views for contests with a lot of problems (let's say 30+, but 100+ was the target). Iirc, most of those are trivial (\@request_cached or select/prefetch_related).

MasloMaslane commented 3 months ago

Recently, we (as in OI's tech team) started looking into improving the performance of oioioi. We'd be very grateful if you would like to share your patches with us!