From: Ghost Shaidan <ghost@ao.net> Date: Monday, February 01, 1999 10:23 AM >If there is a standard for testing this, I'd be happy to perform the tests >on my mud. We use a home grown ascii pfile system. I have noticed no >performance problems with them, other than a lag if we do a force all >save with more than 20 or 25 people on. (Looking for some sort of solution >for this, but I am not far enough along in my research to make any >statements.) I've done this two ways. The hard (but portable) way is to use the gettimeofday() and timediff() functions in comm.c. I don't have the code handy, but if you seach comm.c for gettimeofday you should see what I mean where circle figures out how many milliseconds it needs to wait for the next tick. The easier way is to use a profiler, assuming you've got one. That can also be used to figure out where your lag is coming from more easily than the above method. From past experience with the original ascii release, the weak link was loading one line of data at a time. That's why in 2.0 I added the diskio.c utilities. Instead of reading a line at a time (actually a character at a time until an endline), parsing, and repeating, I load the entire file into memory using a single fread and parse from memory. The increase in performance was incredible. I do the same thing when saving. The diskio.c module in the 2.0 release is pretty easy to use if you'd like to give it a try. It'll require a little rewriting of your load/save routines, but may be worth the effort if your lag is caused by slow loads/saves. Sam +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST