SA-MP Forums Archive
YINI, MySQL or SQLite - 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: YINI, MySQL or SQLite (/showthread.php?tid=605989)



YINI, MySQL or SQLite - JaKe Elite - 27.04.2016

I have been scripting my RP script for 1-2 weeks now and so far the progression of the development is good. However, I am worried about the speed performance of my server when it comes to saving the datas for players, dealerships, vehicles and all.Before we jump in talking about the saving systems, here is the files that are being saved in the scriptfiles/renegade (Yes, I am using YSI - YINI) .

server.ini - tax vaults news ( Loaded and checked OnGameModeInit & is saved every time there is a changes made on taxes, news etc. or OnGameModeExit)

/users/ - Player accounts, looping the weapons. There are at least 30-40+ datas stored per player file.

/users/inventory - Players inventory, there are at least 25 stored datas in here that are parsed in after the usera main file.

/users/vehicles - Players vehicle, there are at least 10 vehicles stored datas (Paintjob, Impounded etc), the file is parsed after the inventory.

/users/tickets/ - Players ticket, there are 10 stored datas in here (fee, reason, date). It is parsed after the vehicles.

/dynamic/factions/ - Factions with 20+ stored datas, they are parsed OnGameModeInit.

/dynamic/factions/payment/ - Factions payment with 10+ stored datas, they are parsedin at the same time of factions.

/dynamic/dealerships/ - Dealerships, 20+ stored datas. They are parsed in the last place @ OnGameModeInit.

/dynamic/impounds/ - Impound Yards, there are 5+ stored datas in here. They are parsed in at OnGameModeInit.

-----------

It is pretty obvious that my script is loading a lot of files but I am fully confident that YINI can load them all at a fast rate but I might be wrong so that is why am asking yall.

What would be recommended saving system for an RP gamemode. YINI, MySQL, or SQLite, I know this has been asked a lot but I didnt found any thread about YINIs performance on RP scripts with tons of data being loaded.

Again am so sorry if this is a 100th post asking the same stuff all over again. Postdown below if you need more info.

P.S. Sorry about my grammar and my typings (am on mobile)


Re: YINI, MySQL or SQLite - Gammix - 28.04.2016

SQL is way faster, easier and advance than INI. Files work on seconds where as SQL work on milliseconds.

Also, it will shorten your code, make use of less memory and all data in one file so you can even make backups or exchange database files.

You can use any of MySQL or SQLite.


Re: YINI, MySQL or SQLite - JaKe Elite - 28.04.2016

It is stupidof mine to ask this but I will do it anyway xD.

If you are asked which to use on these two options, what would you use


Re: YINI, MySQL or SQLite - Gammix - 28.04.2016

Quote:
Originally Posted by JaKe Elite
Посмотреть сообщение
It is stupidof mine to ask this but I will do it anyway xD.

If you are asked which to use on these two options, what would you use
SQLite, i am fan of its capabilities.

If can't make your mind between the choice, you can use this include: https://sampforum.blast.hk/showthread.php?tid=603988

Just in case you are using SQLite and want to turn for MySQL, you can very easily do it in one line edition.


Re: YINI, MySQL or SQLite - JaKe Elite - 28.04.2016

So it is not bad on using SQLite on an RP script eh? Heh.

I will be waiting for everyones feedback, thanks Gammix for your feedback.


Re: YINI, MySQL or SQLite - Mauzen - 28.04.2016

MySQL has a lot of overhead. It needs an external server and is designed for handling much more complex and bigger data than what you usually need on samp servers. I use it myself though, but because I got a mysql server running anyways for other stuff, and because I share stuff between different remote samp servers, so I actually need mysql for that.
In general, Id prefer a database over files, and sqlite over mysql. Start design with sqlite, and only switch to mysql if you stumble accross something that isnt possible with sqlite.


Re: YINI, MySQL or SQLite - SyS - 28.04.2016

sqlite for sure