Jump to content

Recommended Posts

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
https://metin2.dev/topic/1641-mysql_query-vs-pcsetqf/
Share on other sites

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).

 

 

  • Love 1
Link to comment
https://metin2.dev/topic/1641-mysql_query-vs-pcsetqf/#findComment-12224
Share on other sites

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
https://metin2.dev/topic/1641-mysql_query-vs-pcsetqf/#findComment-12239
Share on other sites

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).

  • Love 1
Link to comment
https://metin2.dev/topic/1641-mysql_query-vs-pcsetqf/#findComment-12252
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.