Particle's Custom RPG
PCRPG Development => Development => Topic started by: Hack-N-Slash on May 27, 2004 06:18 am CDT
-
The server has been doing a great job for the majority of the time, but as of late people slowdowns and crashes are becoming increasingly common. What can be done to resolve this without sacrificing the features we have already? The server connection seems to be enough for what we're doing, but the server seems to be choking on itself.
I'm writing down a list of considerations that I'll put down later today. All the questions will be aimed at possible server code optimizations.
-
1. What are the most called functions?
2. What functions take the most resources per call?
3. What has already been done to improve server efficiency?
I'll finish this later
-
if you want to solve all the problems of a tribes rpg server, you must kill GetAccessoryList();
but to do that, you must re-write lots and lots o code.
-
Anything else? I'm going to browse thru the server code and look for areas for possible optimizations.
Are there any places where sorting is involved? I'd hate to see a freaking inefficient sort (bubble and the like) used all the time.
-
hack, i told you the biggest problem in rpg, have a nice time finding anything bigger.
and just for the proof, i'll quote JI :
//Replaces the laggy AddPoints(%clientId, in RefreshWeight (the real lag comes from GetAccessoryList however)
JI put the lag into the mod, and never removed it even though he knew it was there.
-
Ok, ok! *runs and hides*
-
Aside for the infinite loops that constantly run, and that function, there is nothing else that can really be fixed short of writing a special app to manage the server.
-
Wow, I just looked at getAccessoryList... frightening bit of code. Now I understand why you said that eViL: All those looped checks on player inventory.
I'm inclined to toy with it.
eViL, I also recall in the past hearing you say that fetchdata had an impact on the server as well.
-
In a way it does, but there is nothing you can do about that short of rewriting the entire mod.
-
what oz said.
but yes, fetchdata is a giant waste of server clock cycles.... it is called just about as much as the accessory list function is.
-
Woot, my internet has finally come back to life! The service outage got me bored enough to probe more into this.
I wouldn't mind splitting fetchdata into separate functions and rewriting the code accordingly in order to kill that huge mess of if statements. The large if block would have to be a factor in the server's problems if fetchData is called so much.
If this doesn't fix the problem, it would definitely would reduce the time calling info from $ClientData
Either that or I call information from $ClientData whereever fetchdata is called.
If I'm going about this wrong, tell me what I would need to do, in exact terms. I have LOTS of time on my hands, and I need the practice anyways.
If I get this fixed, I'll move on to dealing with getAccessoryList.
-
The best way to rewrite something like the character saving function, is to turn it into 1 quick line of code that still saves everything.
-
Is is just possible to leave the FetchData calls in and just replace the function with and empty function that does nothing?
-
If you want to break the mod...sure.
The function is used to call character information from the server.
-
Yeah... No fetchData, no RPG.
-
Yes, but it would run Hella-Fast yes?
-
It wouldn't run at all.
-
Xanth: So, hella fast?
-
Xanth: So, hella fast?= So very quick.
-
Xanth: So, hella fast?= So very quick.
:lol:
-
Have to teach these people the way of the Xanth. If i don't noone will eh?
-
where can i look at the trpg source code?
-
scripts.vol
Search for a volumer on google to open it. All the code is in the *.cs files (use a text editor to open those).
-------
So...we remake rpg to be match games. (On time limit the server restarts everything goes back to zero.) Then the server wouldn't need to save the character data. Now, how to do that and keep it fun...
Hersh
-
Anyone mind if my little fix breaks Deus Pack?