Skip to content

Conversation

@luator
Copy link
Member

@luator luator commented Dec 9, 2025

Most important changes:

  • Use a global SQLAlchemy engine
  • Change UserData and GameData to be fully static, using the global engine
  • Simplify code for updating the matchmaking parameters.

Since these classes don't have an internal state anymore, turn all their
methods into static methods and call them directly via the class
everywhere.  They now basically just serve as a namespace for the
corresponding functions.
Little helper function that calls SQLAlchemy's `Session.get` and raises
an error if no entry was found.
Doing it like this reduces the separation between storage and
application logic but it only uses a single session instead of four,
which is probably a notable performance gain.
@luator luator merged commit f63e574 into main Dec 9, 2025
8 checks passed
@luator luator deleted the fkloss/refactor branch December 9, 2025 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants