It lags so much, when you see the "Saving all online players" message.
Is there a way to opt this?
I mean, there has to be a way, it seems like it goes through and saves alot of stuff that doesn't need to be saved..
I mean, there has to be a way to only make it save something that has been changed.
Actually, is it even really needed? I mean, everytime you do something, doesn't it save it to your account anyways? If so, what's really the point in this?
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Post your code, and we fix it.
There is no code to post. It was a general idea, as to make MS better..
And also, to inform myself of something.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Yes there is a code. The saving timer in the server. Do you use the default code for it?
Idealy, there should be one point when a player is saved - before they are unloaded from memory. But if you are worried about your server crashing, then I believe this is where this function comes in. Besides these two times, though, you shouldn't ever save any more since File I/O is very slow, especially when using Get/WritePrivateProfileString.
You CAN, if you want, store two arrays for users - one that holds the values loaded into memory from the user file, and one that holds the actual user. Before you save the user, you can just check every value to the second "untouched" array, and only write a value if it has changed.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
I suggest increasing the saving time to like 5 minutes. And using High_Index for it when its saved.. And makes sure to use binary, not ini.
Well, from what I've seen, it automatically saves the player, without doing that. I can pick up an item, and before I log out or the save happens, I can check my account, and the item will be there.
That's why I ask if this is even needed.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Hmm.. the items is stored in memory when picked up. It should not be written to a file directly =/
At least I don't think so. Well the saving part is still pretty much for crash purposes I think.
Problem with 4 is that if you can find the error, you can often fix it. For me, the only crashes I really get with vbGORE are the ones that shut down the server without any word - those are the hard ones to fix. :roll:
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Spodi Wrote:Problem with 4 is that if you can find the error, you can often fix it. For me, the only crashes I really get with vbGORE are the ones that shut down the server without any word - those are the hard ones to fix. :roll:
Search for:
They are dangerous
Well, that's why I was posting. Does anyone have an idea as to how to speed it up?
William, you were wanting another optimization to create a tut for, why not this one?
Refer to my first post, Adv., that's the easiest and one of the best ways to go about it without changing from INI files.
Posts: 2,605
Threads: 412
Joined: Nov 2021
Reputation:
0
Advocate Wrote:Well, that's why I was posting. Does anyone have an idea as to how to speed it up?
William, you were wanting another optimization to create a tut for, why not this one?
Sure, I can make the Saving Part work better. I'll make a tut for it when I get home.
|