y_ini Unexpectedly Slow
#1

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?
Reply
#2

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.
Reply
#3

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?
Reply
#4

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.
Reply
#5

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.
Reply
#6

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.
Reply
#7

SQL would take less than a millisecond.
Reply
#8

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

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

I tought for sa-mp sqlite is enough.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)