In article <>,
Jack Klein <> wrote:
>On 15 Dec 2004 19:50:00 -0800, (soren juhu)
>wrote in comp.lang.c:
>
>> Hi,
>>
>> I am developing a C Program for reading over a million files of size 1
>> kilobytes each and sending the contents to another program using some
>> middle ware. I need some help on designing the program to process such
>> a large number of files in less than 8 hours.
>>
>> TIA
>> Soren
>
>From the information you have provided in your post, the only advice
>anyone could possibly give you would be to buy a faster computer with
>faster hard disk drives to run your program on.
>
>Even if you posted detailed information about the "processing" that
>you had to do on the files, you don't have a C language question, you
>have one about choosing the most efficient algorithm. For that you
>need to post to an algorithm group such as news:comp.programming, and
>be very explicit about the processing you need to do.
I interpret the question this way: what standard c-function
are appropriate and how should I use them.
My answer proves you wrong.
1. Assuming you can guarantee a maximum size of each file,
read them in one go in a static buffer of that size.
2. Go for the lowest level calls, (read/write) and
handle the rest yourself.
3. You total througput seems to be in reach for modern
disks. C is low overhead and shouldn't get in your
way for a reasonable amount of processing.
There is no way the OP ask about "processing to be done".
>Once you have selected an algorithm, possibly with the help of an
>appropriate group, if you have difficulties writing standard C code
There is no way you could mention an algorithm. You have not the
slightest clue, if you wanted to. The OP was well aware that
would be off topic.
>that compiles and executes correctly, then post the problem code here,
>explain your problems with it, and ask for C language advice.
Aren't we going overboard? Such that only home work questions
are appropriate?
>--
>Jack Klein
Groetjes Albert.
--
--
Albert van der Horst,Oranjestr 8,3511 RA UTRECHT,THE NETHERLANDS
One man-hour to invent,
One man-week to implement,
One lawyer-year to patent.