On Fri, 15 Aug 1997, Ron Cole wrote: > I think what's needed more than anything else, are docs on all the things you > need to check for when adding a new room/obj/mob/shop into their sorted arrays, > and ways to get around them. I don't quite follow. You want docs on adding new prototypes to the indices? I remember a while back there were a lot of ideas discussed which you can probably find in the archives. If you're looking for docs on adding variables to the olc package, I'm hoping to eventually include a decent coding.txt. *shrug* > I'm thinking, you'll need to store the vnum along side of everything that stores > an rnum, so it'll be easier to update after you add something. Inserting new > stuff seems to be Oasis' main downfall. It looks like sammy just added to the > end of the arrays, but that slows down all the searches for vnums. Perhaps you > could modify the searches to remember the last sorted element, binary search > thru the sorted part, and then sequential search the unsorted elements. This > was the approach used on a lot of ISAM file systems. That's how I do it now. Actually, Johan Eenfeldt wrote the code. A binary search is performed on the boot-loaded part of the array first, and if that fails it does a sequential search of any new prototypes. Depending on your operating system, the extra search time is probably so small it'll never be noticed. Reallocating memory is much more likely to cause a noticeable lag. Can't say that's why I wrote obuild the way I did, tho. I wrote it that way because that was the best I could do at the time, then kept the standard. THen there's the reset editor, which I think I may replace with a temporary linked list of reset commands while someone's editing the zone, allocating the new array only when they exit the editor. That's assuming I rewrite the old editor. I'm planning on scrapping the whole reset editor in favor of a more wysiwyg implementation. Sam +------------------------------------------------------------+ | 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