From: Olivier D. <dr...@sh...> - 2003-01-21 18:53:25
|
Greetings, While we're at it throwing ideas, how would the speed of XML or otherwise formatted single-file parsing compare to something like DB_File? As far as I know, DB_File is part of Perl (at least on my system) and it would save a lot of parsing work out. On Tue, Jan 21, 2003 at 07:08:20AM -0500, Wizard wrote: > <MessID name="14"> > <subject>NMS scripts are great!</subject> > <user>The Professor</user> > <email>fr...@fs...</email> > <date>20/01/03</date> > <moderate>0</moderate> > <MessID name="17"> > <subject>Re: NMS scripts are great!</subject> > <user>The Wizard</user> > <email>de...@nu...</email> > <date>22/01/03</date> > <moderate>0</moderate> > </MessID> > </MessID> Let me take a stab at this one too with a filesystem based hierarchy of DB files: /msgindex.db /000001.db /000001/msindex.db # replies of /000001.db /000001/000001.db /000001/000002.db /000001/000003.db /000001/000003/msgindex.db # replies of /000001/000003.db /000001/000003/000001.db /000001/000003/000002.db /000001/000003/000003.db /000001/000004.db /000002.db /000003.db /000004.db /000005.db ... msgindex contain a list of all the posts in a directory. We can quickly check the directory tree for threads of messages. The xxxxxx.db files contain the post data. Building an index (link) page seems simple enough. Modifying post would probably be slow (I think it does in place) but we usually don't modify posts. Deleting messages (unlink and delete msgindex reference), entire threads (rm -rf the directory) even is joke. The only issue I can see is DB_File has only been part of Perl since v??? and that the space requirements might be an unecessary strain on quota'd systems/users. On this, anyone knows how file size for DB_File compare to let say something equivalent in XML? We could also use CSV or some other database schema. What do you think? -Olivier -- __-/| ? ? |\-__ __--/ / \ (^^) / \ \--__ _-/ / / \ / ( ) / \ \ \-_ / / / / ~( ^^ ~ \ \ \ \ / Oli Dragon dr...@sh... \ / Sfwr Eng III ( McMaster University \ / / / __--_ ( ) __--__ \ \ \ | / / _/ \_ \_ \_ \ \ | \/ / _/ \_ \_ \_ \ \/ \_/ / -\_\ \ \_/ \/ -) \/ *~ ___--<******************************************************>--___ [http://pgp.mit.edu:11371/pks/lookup?search=olivier+dragon&op=index] ~~~--<******************************************************>--~~~ |