Sober 37 Posted June 15, 2014 Share Posted June 15, 2014 Is it better for performance to store my values in the database using mysql_query or using ymir's pc.setqf? I have made a pet system quest with levels and bonuses etc with mysql_query and it seems that when i summon or unsummon my pet i lag for about 2-3 seconds Link to comment Share on other sites More sharing options...
Sober 37 Posted June 15, 2014 Author Share Posted June 15, 2014 UP! Link to comment Share on other sites More sharing options...
Sober 37 Posted June 17, 2014 Author Share Posted June 17, 2014 I am using Vanilla core please any expert answer! UP! Link to comment Share on other sites More sharing options...
Think 117 Posted June 17, 2014 Share Posted June 17, 2014 MySQL is usually the bottleneck, but in your case, the problem is in neither. First: is it better to use setqf or mysql_query? setqf, no doubt. It's cached from the server side. But in the case of a complex pet system, it's probably easier to use mysql_query. You may lose performance using mysql_query, but it also may be easier to understand and develop than tons quest flags (For example, with a pet table). You decide what you think is better, I don't think using mysql_query is a bad idea here. But as I tell you, it's not your problem. Where's the delay then? a ) 50% In your quest receiving mount/dismount commands. b ) 50% In YMIR's terrible pet mounts implementation. And sadly you can't fix a ) nor b ) unless you compile your own core (and do the appropiate changes). 1 Link to comment Share on other sites More sharing options...
Sober 37 Posted June 17, 2014 Author Share Posted June 17, 2014 Thanks , yes that's true it's far more convenient using a mysql table than setqf... Another one question, i am just curious...Is it realy bad using a loop timer for many players ?And will the performance reduce if i decrease the frequency of the loop timer? Link to comment Share on other sites More sharing options...
Think 117 Posted June 17, 2014 Share Posted June 17, 2014 We didn't see any performance downgrade no. Probably having many loops executed every second can be problematic, but if you space them enough, say 1 minute, the server usually handles them good enough (Although of course it depends on what you are doing when the timer is ran, and if it has a high server load, but well, that's unlikely. The timers running by theirselves don't present any special load, that's what I meant). 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now