Foohy / jazztronauts

Jazztronauts is a cooperative theft-em-up for Garry's Mod, also known as prop hunt 2.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Long term play inflates SQLite tables big and round, hobbling performance

puppable opened this issue · comments

commented

Hi! I've been running a server with some friends for some time now, and starting a while back, I had begun to notice degrading performance when opening the (Jazztronauts custom) spawn menu or using the prop drop lever. As of recent, this has escalated to long game freezes when even tapping the spawn menu key (which goes away after subsequent openings on the same map), and FPS drops/freezes so severe as to kill the server when dropping props. Furthermore, just collecting props/brushes began to result in slowdowns that would threaten the game being playable at all.

After finally looking into the problem, it appears to be caused by how Jazztronauts is storing prop statistics in sv.db. Namely, the unlocklist_props table had grown to over 15,600 entries, while the jazz_propdata table had grown to over 54,000. Manually paring down both of these tables by a ton instantly fixed the issues with the spawn menu and the prop drop respectively.

Judging from that, it seems like the mod would probably benefit from having something to automatically cull the tables, or if feasible just handling super big prop tables without the performance choke, or both? I wouldn't know enough to say which myself! Either way, thank you for all you do in keeping this mod going!

TL;DR: unlocklist_props and jazz_propdata tables in sv.db accumulate tens of thousands of entries after enough play, respectively killing performance for spawn menu and prop drop, as well as general gameplay eventually

Thank you for investigating so thoroughly for your report!

It's a very manual solution, but #192 (which was merged into @SageJFox's sceneroots branch, where a lot of our development has been going, it just hasn't been pushed because of many internal delays) adds a console command to clear those completely and temporarily solve the problem. I believe we also shifted the tab order around so trying to open the spawnmenu doesn't load-lock you.

Ideally, this would just never happen, or the game would automatically clean up, rather than requiring the manual use of a console command. I'm not sure what the best way of handling that would be. But a manual fix is better than no fix.