My plan eventually, is to have an event queue to reset an object, or mobile as required. Then it won't try to reset anything ever unless it lands in the event queue.
I have no determined how to do it yet, and am too pressed for time to enjoy my mud right now :( > > -----Original Message----- > From: Chad Simmons [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 22, 2003 12:16 PM > To: Chris Winston Litchfield > Cc: [email protected] > > > --- "Chris \"Winston\" Litchfield" <[EMAIL PROTECTED]> wrote: > > OLC has the reset_room function. I doubt many dont use OLC. > > > > I can see a definite speedup with rooms here. as you dont have the > > call to see if the vnum exists. > > > > You don't have to call to see if the vnum exists anyway. In > fact looking at stock quickmud, it doesn't. It just gets the > room by the vnum and passes that to reset_room. For both > versions it's still checking if the pRoom != NULL within the > reset_room function. > > But yes, it will save you some time having to search the hash > for the room. As I said before, it may end up costing you > quite a bit of memory though, for all the gaps in your array. > As for optimizing, there isn't anything obvious that will > give you a significant performance boost. One thing I might > suggest (assuming you aren't using an event queue), would be > to create a list, hash, etc. of rooms that need to be reset. > Then you can go through this list and reset only a few rooms > at a time. This would prevent the pause that often happens on > repops. You could also mark a reset as having been "finished" > when it no longer needs to fire, and that would prevent a lot > of the lookups that happen when a room's age is sufficient to > require a repop, but all the objects and creatures are all > still there. > > Just some suggestions > ~Kender > > ===== > -----BEGIN GEEK CODE BLOCK----- > Version 3.1 > GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ > P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O > M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ > b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++ > ------END GEEK CODE BLOCK------ > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design > software http://sitebuilder.yahoo.com > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom >

