MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Text Parsing
On Wed, 9 Jun 1999 20:13:58 -0700 (PDT)
Matthew Mihaly <diablo#best,com> wrote:
> On Wed, 9 Jun 1999, Chris Gray wrote:
>> [Matthew Mihaly:]
>> The main advice that has been given here in the past is to
>> profile your code. If it's C or C++ code, compile it with -p or
>> -pg flags, and run it for a while. Collect the results and see
>> where all of your time is going. Let us know the results, and
>> I'm sure lots of further advice will follow from there.
> Yeah, I profiled it all. Mob ai is taking up about 20% of
> processor time, and player movement is quite slow, taking up to
> .07 seconds when malloc is low (our server has an irritating
> little memory leak, which we're working to fix).
In which case I would suspect architectural weaknesses, such as the
code repatedly checking or doing work which is not strictly
necessary to do. Some standard and commong examples of such
enclude:
Polling loops.
Linear data set traversals (versus indexes, hashes or other lookup
mechanisms)
Balanced data structures used for rapidly changing data sets
Repeated avoidable large working set changes
Spinlock abusive IO techniques
> So really, at most, that accounts for, on the high end, say, 35%
> of processor time. The other 65% seems to be reasonably
> well-distributed among everything else.
Which is the point. That's a heck of a lot of CPU to burn not doing
much. The task is to find out what you are doing that you don't
need to be doing.
--
J C Lawrence Home: claw#kanga,nu
---------(*) Linux/IA64 - Work: claw#varesearch,com
... Beware of cromagnons wearing chewing gum and palm pilots ...
_______________________________________________
MUD-Dev maillist - MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev
- Thread context:
- Re: [MUD-Dev] Text Parsing, (continued)
- Re: [MUD-Dev] Text Parsing,
Adam Wiggins adam#angel,com, Thu 10 Jun 1999, 22:55 GMT
- Re: [MUD-Dev] Text Parsing,
Katrina McClelan kitkat#marcus,pants.nu, Fri 11 Jun 1999, 01:35 GMT
- Re: [MUD-Dev] Text Parsing,
Petri Virkkula pvirkkul#iki,fi, Fri 11 Jun 1999, 04:09 GMT
- Re: [MUD-Dev] Text Parsing,
J C Lawrence claw#varesearch,com, Fri 11 Jun 1999, 02:35 GMT
- RE: [MUD-Dev] Text Parsing,
Koster, Raph rkoster#origin,ea.com, Thu 10 Jun 1999, 03:49 GMT
- RE: [MUD-Dev] Text Parsing,
Koster, Raph rkoster#origin,ea.com, Thu 10 Jun 1999, 14:53 GMT
- [MUD-Dev] Searching the archives,
claw claw#kanga,nu, Fri 28 May 1999, 06:10 GMT
[ Other Periods
| Other mailing lists
| Search
]