Raised This Month: $12 Target: $400
 3% 

[RESOLVED]Lag in Event PlayerDeath


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
neo_gis
Member
Join Date: Sep 2009
Location: Rabat
Old 06-13-2010 , 11:10   [RESOLVED]Lag in Event PlayerDeath
Reply With Quote #1

hey all ,

in the plugin i do some stats calculations on the event player_death and store them in sqlite database , so when you kill someone it makes you freeze for half a second . of course once i remove the stats calculation part of the plugin the games goes just fine .

That stats calculation part is important to me , its nothing heavy , some plugins calculate much heavier stats and it doesnt freeze .

Any idea how to avoid this ?

Thx all !
__________________

Last edited by neo_gis; 06-15-2010 at 15:06.
neo_gis is offline
Send a message via MSN to neo_gis Send a message via Skype™ to neo_gis
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 06-13-2010 , 11:39   Re: Lag in Event PlayerDeath
Reply With Quote #2

If you aren't already, try threading the sqlite query.
Wazz is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 06-13-2010 , 11:45   Re: Lag in Event PlayerDeath
Reply With Quote #3

Yes, injecting the data into SQL Lite will cause your plugin to freeze. You will have to thread it.
Keeper is offline
neo_gis
Member
Join Date: Sep 2009
Location: Rabat
Old 06-13-2010 , 15:39   Re: Lag in Event PlayerDeath
Reply With Quote #4

ah indeed the problem is coming from there , i'll give the threading a try , have to read about it tho ^^ .

Thx for the help !
__________________
neo_gis is offline
Send a message via MSN to neo_gis Send a message via Skype™ to neo_gis
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode