18.02.2014, 05:00
Quote:
@PowerPC603: No problem, it's none of my concern. I'm just saying, that some scripts need 5 seconds startup more than 20 seconds (daily gmx, or multiple gamemodes), and you nonetheless should aim at better performance than your competition. Always.
|
I'm only loading 1 speedcam, 23 gas-stations, 7 police-stations and 212 vehicles for now during startup.
As soon as I double-click samp-server.exe, the server is running before I can release my hand from the mouse (if mysql-logging has been disabled).
It now waits until all data has been loaded before moving on (before server is online) with the code I posted above.
Even if it would need 10x more data, it would load in less than a second.
And there will be alot of data to load when the entire GM is finished and everything has been converted to mysql.
Right now, I'm still using files for all gamemode-related data.
Only my filterscript uses mysql for now.
Quote:
use cache_get_row_int
you'll see even more speed improvements PowerPC603 I only use cache_field_content for large tables which i might add values in between often |
Adding extra fields could mean some columns will move to present the data in a neater way (most important data in the first columns).
I could use cache_get_row_int at a later date when I'm certain that tables won't change anymore to increase the loading even more.
Right now, the loading is fast enough (I can't see the script waiting yet for data-loading to be completed), it's loaded and running in the blink of an eye.