thewca / wca-live

Platform for running WCA competitions and sharing live results with the world
https://live.worldcubeassociation.org
70 stars 23 forks source link

Using the API to enter attempts is slow #201

Closed Citaborg closed 9 months ago

Citaborg commented 9 months ago

We had average of > 1.5 seconds for each POST during competition which I consider very slow.

jonatanklosko commented 9 months ago

I don't think there is any obvious inefficiency. Entering an attempt updates positions (and possibly record tags) for other results in the round, so when there are many competitions it puts certain load on the database and instances. We have automatic scaling to keep it manageable in general.

For an external device, waiting additional 2s to finalise the attempt at the station I would consider fine. From #202 I gather you use a scanner, so I can see how the delay is more noticeable. I think we can improve this by #202 with batch mode, I will comment there :)