Am 30.05.2011 13:16, schrieb Ian Haywood:
> On Mon, May 30, 2011 at 6:47 PM, Rolf-Werner Eilert
> <eilert-sprac...@t-online.de>  wrote:
>
>> Well, I want both... First I simply need the complete list of names
>> (first line only), later I have to look into each file to find data. So
>> I will use both ways, thank you!
> Hmm, most of the time will be opening the file, so doing both may be the
> slowest solution as you are opening twice.
> If you eventually need to read in all the files, and you have enough
> RAM, best solution
> would be to read the lot using File.Load ()
> If you only read the rest of some files, then read the first line
> using OPEN and keep the file objects
> so you can read the rest without opening them a second time.
>
> Ian

That's a good idea :-) Although I must say that Linux has very good file 
buffering. As soon as a file has been read once, it will take only 
milliseconds to open and read it again, even with masses of files.

Anyway, this is a thing I'll keep in mind for next time when I have to 
revamp the file and filtering functions. It could really help.

Rolf



------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to