[Gambas-user] What is faster: OPEN or File.Load?

Ian Haywood ihaywood at ...1979...
Mon May 30 13:16:33 CEST 2011


On Mon, May 30, 2011 at 6:47 PM, Rolf-Werner Eilert
<eilert-sprachen at ...221...> 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




More information about the User mailing list