Discovery Gaming Community
[Coding] DSAM takes forever to load the account database - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Discovery Development (https://discoverygc.com/forums/forumdisplay.php?fid=7)
+--- Forum: Discovery Mod General Discussion (https://discoverygc.com/forums/forumdisplay.php?fid=37)
+---- Forum: Discovery Mod Bug Reports (https://discoverygc.com/forums/forumdisplay.php?fid=573)
+----- Forum: Fixed or invalid (https://discoverygc.com/forums/forumdisplay.php?fid=574)
+----- Thread: [Coding] DSAM takes forever to load the account database (/showthread.php?tid=199809)



[Coding] DSAM takes forever to load the account database - Alex. - 10-23-2023

Type: Coding
Bug: When we release new patches, except simple hotfixes, our usual procedure involves telling DSAM to do a complete re-load of the account database. This is ungodly slow and it's not clear why. It doesn't take nearly that long to grep through all character files or even to run mass equipment changes. This sometimes holds the server in downtime for hours during patching.
Since the latest DSAM source code was last some years ago we may have to decompile the existing one we have on the desk, fix up the resulting source code, test it out, and attempt to deploy it to the live server.


RE: [Coding] DSAM takes forever to load the account database - Alex. - 12-30-2025

@Aingar has been working on this recently via modifying a DSAM decompilation. A lot of it has to do with visit flags, a lot is SQLite, a lot is simply the ridiculous size of our character database having run for so many years with no inactivity wipe, but there's also a lack of multi-threading going on and likely other issues too.
I have found that whereas the production game server takes a good ~45 minutes to reload the full account database (which is downtime during major patches), on my laptop (where I have slower SSDs than the disco server) I can parse all character files in 10 minutes in serial, or 1.5 minutes if I use multithreading, so there is definitely some efficiency to be gained here.


RE: [Coding] DSAM takes forever to load the account database - Aingar - 01-11-2026

It's now as fast as I can reasonably make it without rewriting the entire thing from the grounds up. Can we consider closing the issue?


RE: [Coding] DSAM takes forever to load the account database - Alex. - 01-11-2026

yep