----- Original Message -----
From: Loren Frank <[EMAIL PROTECTED]>
To: Norm Dresner <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 25, 2001 2:43 PM
Subject: Re: [rtl] another disk write performance question
> I have written a program to do just that, but, because
the data files I'm
> separating contain both multiple sources and mutiple
types of data, the easiest
> way to write it involved going through the file once for
each source and then
> fseek-ing back to the beginning for the next source. The
other alternative that
> I could think of involved keeping 24 or so files open at
once and writing to
> them sequentially, but I think that might cause
problems....
>
> Loren
If you have a program that can read through the records in
the file sequentially and decide whether or not it pertains
to a particular category (i.e. destined for a specific
output file), then I don't understand why you couldn't do
this once, using perhaps a big switch statement if you need
to "process" records of different types differently or
perhaps an array of file descriptors.
I agree that on some systems there's a rather meager limit
to the number of open files, but even so, you could reduce
your post-processing time from 24 passes to 4.
Hey. I just had an idea: If you're willing to hire
someone to write this program ... ;-) Just kidding, I
barely have the time to breathe these days and sleeping is
definitely non-productive.
Norm
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/