I know I emailed a few people I would get the commands read from file options patches versus BPL12 by this weekend. If it wasn't for my 3 year old monitor taking a crap, I probably would have. Anyways, I needed a new monitor, so I'm not bitching that badly. Anyways, I dug around the source last night, and found some interesting ways to optimize the game loop. A majority of the input from the user (process_input() in comm.c) is made into lowercase (command_interpreter() in interpreter.c). The only time this is not the case is when you are either getting the password from the client, or else the descriptor is in a "writing" or "editing" mode. There are several times when the strings are "recopied" from one buffer to the next, back and forth, and tolower() is reapplied. Minimizing the amount of data that is moved is key. If anyone really wants to optimize the run-time execution of the server, they should dig around some of the innermost loops, and instead of recopying the strings, to pass pointers of the strings around instead. The only problem you run into is a matter of paranoia, corruption of the initial data (one of the reasons as to why playing with char **argv is a no-no). The patch, I'm working on will not do this, but I plan to look into it. d. +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/08/00 PST