From: Erwin S. Andreasen (erwin@PIP.DKNET.DK)
Date: 11/25/97

On Tue, 25 Nov 1997, David Klasinc wrote:

> *scratch* Hm, how many of you guys (gals?) are using events? I'm curious,
> how much load on the CPU they create? For example if you have like 20
> events every second... :)

That rather depends on what the events do? Dispatching them takes up
minimal CPU time, if done properly (see for how I did it)

Replacing loop-based hings with event-based can reduce CPU time a lot,
for example going from looping through 6500 characters checking for
fighting each 2 seconds certainly was much slower than just checking for
characters fighting in a room when an event bound to the room triggers.

Are you sharing your machine with many other people though? If you are
worried about CPU time, something else is probably wrong :) AR uses 2.5%
CPU time (OK, of this multi-cpu Sparc system :), 7500 events wait to be
executed, 72 are executed every time, 33.7mb of memory is taken up by
25000 rooms, 6500 mobs, 12000 objects. 11.9 million lines of mobprogs were
executed in the 3.5 days of uptime.

Erwin Andreasen   Herlev, Denmark <>  UNIX System Programmer
<URL:>     <*>         (not speaking for) DDE

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/08/00 PST