Re: [newbie][question][code]Ascii Pfiles

From: George Greer (greerga@circlemud.org)
Date: 03/26/99


On Fri, 26 Mar 1999, Daniel A. Koepke wrote:

>Another advantage of ASCII player files: you don't need the intermediate
>structures that CircleMUD is filled with.  That means no more
>char_to_store() and store_to_char() functions since ASCII player files
>can write strings without having to write the length (or have the length
>be static as Circle does).

Another advantage, we already have fread_string() for them too.

>Note that just using mmap() makes ASCII player files *fast*, powerful, and
>allows you to make in-memory modifications (and the disk version is then
>synched to match).

mmap() is just awesome.  I mmap() a file without caring how big it is and
return a 'char *'.  The underlying code plays with that string as much as
it desires and I don't have to worry about "chunking" the input to make it
not exceed RAM. Then I simply unmap the file and continue with life.

We already know CircleMUD 4.0 will not use binary player files by
default.[1]

--
George Greer            | My beta stuff and related information.
greerga@circlemud.org   | http://www.circlemud.org/~greerga/

[1] - Doesn't rule out having ASCII, binary, MySQL, FTP[2], and more.
[2] - It may sound strange, but with the right abstraction...


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



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