DMOJ / online-judge

A modern open-source online judge and contest platform system.
https://dmoj.ca
GNU Affero General Public License v3.0
951 stars 365 forks source link

Ship rendered HTML fragments through event server #1313

Open Xyene opened 4 years ago

Xyene commented 4 years ago

Currently, live updates work like this:

This is inefficient, and takes an extra round trip. The rendered content is effectively static for each update, and we could send it as part of the update itself. The crucial sections are:

https://github.com/DMOJ/online-judge/blob/master/judge/bridge/judgecallback.py#L143-L149

https://github.com/DMOJ/online-judge/blob/master/judge/bridge/judgecallback.py#L388-L391

...but we could likely render for all updates anyway, since they're not dependent on the permissions of the viewing user.

quantum5 commented 4 years ago

Things to consider: i18n.