BeeStation-Hornet icon indicating copy to clipboard operation
BeeStation-Hornet copied to clipboard

Ports dbcore refactor, and limits the maximum amount of concurrent async queries to a variable amount

Open Tsar-Salat opened this issue 1 year ago • 4 comments

Ports:

  • https://github.com/tgstation/tgstation/pull/59676

About The Pull Request

Refactors dbcore to work off a subsystem if executed async and limits the maximum amount of concurrent async queries to 25.

Why It's Good For The Game

TG coders say:

May or may not resolve terry crashes, however, each query creates a new thread which takes up 2mb, preventing the game from using that 2mb. This can lead to ooms if they stack up, e.g. due to poor connectivity. This solves that issue.

Performance gain

Testing Photographs and Procedure

Screenshots&Videos

Setup and game start (No SQL or DB errors)

image

Running empty queries with DB connected

image

Changelog

:cl: rkz, Watermelon914 server: Refactors dbcore.dm and limits the maximum amount of concurrent async queries to 25. /:cl:

Tsar-Salat avatar Nov 30 '23 01:11 Tsar-Salat

I'm a bit curious what prompted for the port

I'm doing a general push to make the lobby windows(changelog, manifest, latejoin) and interface (observe, etc) TGUI instead of html. Had discussions with maints for possible design directions.

I want to nip any of the pitfalls or performance issues TG had in the bud before I decide on where to go. This is one of them.

Tsar-Salat avatar Dec 03 '23 23:12 Tsar-Salat

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Feb 15 '24 18:02 github-actions[bot]

I'm afraid to touch this one, it's beyond my field of knowledge. Get with Crossed/Kat to merge when they're available.

Rukofamicom avatar Mar 03 '24 15:03 Rukofamicom

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Mar 10 '24 18:03 github-actions[bot]

Ive checked with the new banning panel and DB, dont see any kinks.

image

Tsar-Salat avatar Mar 15 '24 15:03 Tsar-Salat

Since async queries need to wait for the controller to run, it causes delays on all async queries (which is currently all of them as there are non marked as synchronous). This has resulted in the player panel taking over a second to open now, because fetching the metacoins runs a query which needs to be fed into the controller.

PowerfulBacon avatar Apr 04 '24 12:04 PowerfulBacon