MySQL client_aughorized lag
How can I help to make this not lag everyone when a player joins the server?
Code:
public client_authorized(id) |
Re: MySQL client_aughorized lag
Use SQLx, the new threaded query system instead. Player is authorized (though I'd use client_putinserver instead), you fire off the query, game goes on, query comes back and you act on it.
I'd put it in client_putinserver instead because you'll perform the query less often as not everyone who authorizes actually makes it into the server. Further, if you're using sv_downloadurl, clients will authorize twice very frequently, thus you'd be running the query and code much more often than you need to. |
Re: MySQL client_aughorized lag
SQLx huh...
Thats what I was afraid of.. I'm pretty dull already and struggled getting DBI to work. Every time I've sat down and went their the tutorial for SQLx I ended up running away with my tail between my legs... lol I will definitely keep trying though. I will also use client_putinserver as well. One thing I was thinking that might be causing some of lag is the basic nature at which I'm determining the Ranks. (ie. If else if else if else, etc. bleh) I started to try and adapt that function like so; Code:
new PlayerRank[33]Anyway, does anyone think I should put any effort into adapting the above? Or perhaps use CASE's instead of IF ELSE? Would either of those even produce any noticeable optimization? |
Re: MySQL client_aughorized lag
Using a switch instead of if/else is faster though I don't know that you could do it with your code. Also, it's not appreciably faster in this context.
If you want to know exactly what in your code is causing the lag, you need to instrument it. In other words, do something like this around statements that you think could be causing a problem: Code:
|
Re: MySQL client_aughorized lag
Thanks for the reply. I will add that code for sure.
I see that you give assistance for a decent price. I will PM you now. |
| All times are GMT -4. The time now is 22:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.