Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > Re: Faster meth...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 5990 of 6154
Post > Topic >>

Re: Faster method needed - reading text files stored on local network file server

by Marco van de Voort <marcov@[EMAIL PROTECTED] > Feb 22, 2008 at 10:14 AM

On 2008-02-22, Rob Kennedy <me3@[EMAIL PROTECTED]
> wrote:
>
> LoadFromFile necessarily loads the entire file. Does it work any faster 
> if you don't read the whole file? How fast does "cat" work in comparison

> to "head -n5"?
>
> AssignFile(F, FileName);
> Reset(F);
> try
>    Readln(F, readOneLine); // read and discard first line
>    Readln(F, readOneLine); // read and discard second line
>    for i := 3 to 5 do begin
>      Readln(F, readOneLine);
>      // Do something with this line
>    end;
> finally
>    CloseFile(F);
> end;

And maybe a filemode to avoid any lock? From memory, getting the lock is
sometimes the costliest operation on a network drive.

In general characterisation of what is the cause of the problem (latency
or
throughput) is also a good one.
 




 6 Posts in Topic:
Faster method needed - reading text files stored on local networ
fokrogh@[EMAIL PROTECTED]  2008-02-21 05:52:49 
Re: Faster method needed - reading text files stored on local ne
Anton <anton.txt@[EMAI  2008-02-21 14:50:43 
Re: Faster method needed - reading text files stored on local ne
Anton <anton.txt@[EMAI  2008-02-21 19:30:06 
Re: Faster method needed - reading text files stored on local ne
Hans-Peter Diettrich <  2008-02-21 21:28:22 
Re: Faster method needed - reading text files stored on local ne
Rob Kennedy <me3@[EMAI  2008-02-21 19:07:55 
Re: Faster method needed - reading text files stored on local ne
Marco van de Voort <ma  2008-02-22 10:14:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Oct 10 19:55:03 CDT 2008.