SA-MP Forums Archive
y_ini Unexpectedly Slow - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: y_ini Unexpectedly Slow (/showthread.php?tid=574833)



y_ini Unexpectedly Slow - Garavel - 21.05.2015

Hello guys.

So I am using y_ini because it was advertised to be ultra fast. Is it normal that it takes ~100 miliseconds for y_ini to complete the save below? It is about 300 lines of player info. Currently if the server tries to to save accounts of 50 players simultaneously, it halts everything for 5 seconds, which is... well pretty long. Any ideas? What am I doing wrong?


Re: y_ini Unexpectedly Slow - Vince - 21.05.2015

Hardly "unexpected". Writing to disk is inherently very slow, no matter what system is built on top of it. If you need that much data you may consider converting to SQL.


Re: y_ini Unexpectedly Slow - Garavel - 21.05.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
Hardly "unexpected". Writing to disk is inherently very slow, no matter what system is built on top of it. If you need that much data you may consider converting to SQL.
Well, why not. How faster is SQL? Is it worth the hassle to convert all that data?

I am running my server on a VPS with 2GB ram, 2 cores Intel Xeon 3 GHz. Would the writing speed increase to a reasonable level if I upgraded the VPS 2x?


Re: y_ini Unexpectedly Slow - dominik523 - 21.05.2015

MySQL is really fast. I remember one query where I was selecting all businesses. It took around 0.1 miliseconds to finish the query so it's pretty awesome and it isn't that hard to learn.


Re: y_ini Unexpectedly Slow - Garavel - 22.05.2015

Quote:
Originally Posted by dominik523
Посмотреть сообщение
MySQL is really fast. I remember one query where I was selecting all businesses. It took around 0.1 miliseconds to finish the query so it's pretty awesome and it isn't that hard to learn.
That's great, I am more interested in writing speed though. Has anyone compared the two in depth? I searched but couldn't find.


Re: y_ini Unexpectedly Slow - rappy93 - 22.05.2015

The difference between ini and SQL is that ini writes the information in a .ini file so it is limited by the speed of the hard-disk. SQL stores the information in tables so I don't think it is limited by the hard-disk.


AW: y_ini Unexpectedly Slow - Mellnik - 22.05.2015

SQL would take less than a millisecond.


Re: y_ini Unexpectedly Slow - Garavel - 22.05.2015

From 100 ms to less than a millisecond? Shieet negro, I am in.


Re: y_ini Unexpectedly Slow - RaeF - 22.05.2015

move to sqlite man, you don't need mysql plugin and instaling mysql-server anymore.

I tought for sa-mp sqlite is enough.


AW: Re: y_ini Unexpectedly Slow - Mellnik - 23.05.2015

Quote:
Originally Posted by Garavel
Посмотреть сообщение
From 100 ms to less than a millisecond? Shieet negro, I am in.
This means you will need to study SQL from now on. If you don't you will end up with a shitty database design.