pereztr5 / cyboard

Scoring engine for cyber defense competitions
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Performance tune-up #28

Closed tbutts closed 7 years ago

tbutts commented 7 years ago

With this PR, I made quite a few improvements aimed specifically at performance. This was in response to some of the hacky fixes we had to do to keep the system running smoothly, during the last event. Originally, I only planned to do performance of the WebSocket endpoints, but the scope crept.

The two biggest improvements I found, were the rework to the WebSocket handlers, and the updates to the score calculation query.

Pretty much every database query was looked at, and changed where I felt appropriate. Most of the time, this was either to add concrete types, which make the app easier to trace, or to improve DB index usage, which is known to drastically improves performance.

There are also a handful of small fixes, like the 404 on the favicon, and improved log statements.

Commit shortlog

Closes #24