I've moved the player stats storage of my gamemode to SQL lite (the SQL library included with GMod ), but every time I query it the whole game freezes until it's done.
Dropping a table or creating a new one can freeze the game for up to a second, and amending a single value in one table causes a noticeable stutter.
I know other gamemodes must use SQL, but they don't seem to have these stutters. How can I fix this? Does the third party MySql library have this effect? I own databases on the internet that I use for my site so I can resort to the MySql library if it doesn't freeze like SQL lite does.
they dont use sql lite
they use mysql with tmysql
You shouldn't worry about destroying/creating tables, as those only need to be done once or twice. Also, it probably creates this effect because I assume you're doing it in SP and it has to run off of your machine (just a thought). One thing you could try using is the [url=http://wiki.garrysmod.com/?title=Sql]sql.Begin() and sql.Commit()[/url] functions, especially if you're doing multiple queries at once.
Sorry, you need to Log In to post a reply to this thread.