@Kestrel
Maybe you should also consider using a modern library for server-side asynchronous logging, such as **spdlog**.
I briefly looked through the leaked code, and it seems like the server queries the database every time a player performs an action in-game. This can potentially be blocking and cause unnecessary database load.
I would recommend changing the architecture so that player data is kept in RAM while the server is running. Instead of writing to the database after every action, the server could update the in-memory data and periodically flush the changes to the database (for example, every 4–5 minutes) in bulk.
An old and not particularly well-optimized MMORPG server project might be useful as an example:
https://github.com/Open-KO/KnightOnline
In this project, user data and other important data are loaded from the database when the server starts. After that, the server works primarily with the data in RAM. Changes made by players are applied to the in-memory data rather than immediately writing to the database. Every 4–5 minutes, the updated data for all players is written back to the database in bulk.
This approach could significantly reduce the number of database queries and avoid unnecessary blocking during gameplay.
example of what i try to mention :
https://github.com/Open-KO/KnightOnline ... zerApp.cpp
check function bool EbenezerApp::OnStart()
every info loaded at start like item properties etc, so server just find and use them from RAM, same for user info and many other things.