Jim Barchuk wrote in a message to Jack Stein:
JS> I guess, but how long does it take to open and close a file?
JB> Several files, no problem. <2xx files, no problem. Several
JB> thousand files, there's a problem. DOS was not designed to
JB> handle that kind of volume.
I reckon, but I was speaking of HPFS, which is the only way to keep a large
*.msg base w/o waisting disk space, optimizing speed and zero fragmentation.
JS> Me too, but I've never done anything else on a message base, so
JS> my opinion isn't worth a lot for sure.
JB> Try it. Write a program that creates 5,000 files numbered
JB> sequentially. Then write a program that does nothing but
JB> open and close them -in- -order-. I did this once to test a
JB> netmail sort-by-date-and-renumber utility, 4000 files, was
JB> -stunned- at how long it took, -far- longer than 10x the
JB> time it took to do 400 files.
In REXX, I did
/***/
lapsed = time('e')
do i = 2 to 4000
rc = stream(i".msg","C","OPEN")
rc = stream(i".msg","C","CLOSE")*/
end
lapsed = time('e')
say lapsed
That took 66 seconds to open and create 4000 empty files
Then I repeated it with the existing files, and it took 47 seconds.
So simply opening and closing 4000 files didn't take too long.
Then I did a ren...
ren '/q' i'.msg' i - 1||'.msg'
This took a long time (it's a DOS/OS2 command, not REXX). I quit after about
10 minutes, (got tired of waiting) and it was on message 3090 when I killed
it.
Then I deleted them all:
rc = sysfiledelete(i'.msg')
and that took 73 seconds.
I don't know why it took so long to rename all the files, but I suspect it
could be done as fast as actually creating the files, or deleting the files
using the right code instead of the command processor REN utilitiy.
Even at that, how long does it take to delete 4000 messages from an 8000 msg
msg database, renumber the top 4000 to a bottom 4000? I'll bet it takes a
comparable time, considering the base needs to do the same work at the file
level, including re-indexing?
I use DOS ORENUM under OS/2 to manage my *.msg bases in an HPFS drive, and it
generally takes about 10 minutes to do just under 50 echo's. The time is not
greatly effected by the number of messages either... takes just over 10
minutes to do 600 or 1200 messages.
I know there are faster utilities to renumber a *.msg base, at least I heard
there were, but even at twice the speed, were talking 5 minutes diff, not
enough to worry about on an average system. One carrying all 1000 echo's I
guess the issue gets more importance.
My point is, that under OS/2 and HPFS, on a normal size BBS, a *.msg base
works great as far as speed, stability, little wasted space but has the
advantages of ease of use, zero fragmentation (I NEVER defrag my HPFS drive,
it stays permenantly at under 10% fragmented for over 5 years now.)
I'm not saying a database format is stupid or anything, but for those of us
who already use a *.msg base and have a bunch of home grown utitlities to do
things with it, its rather nice under HPFS drives.
Jack
--- timEd/2-B11
---------------
* Origin: Jack's Free Lunch 4OS2 USR16.8 Pgh Pa (412)492-0822 (1:129/171)
|