Jump to content
Sign in to follow this  
TheTex

FileReadLine Lag Issue

Recommended Posts

TheTex

I am using FileReadLine to loop through reading a different line every couple seconds or so.

the problem is there are thousands of lines in the text document so every time it opens it to read the file it has a long "lag" delay that slows the program down tremendously.

What I am asking is if there is a way to just keep the file open then keep reading it through every loop.

Share this post


Link to post
Share on other sites
evilertoaster

FileOpen() ?

Share this post


Link to post
Share on other sites
herewasplato

I am using FileReadLine to loop through reading a different line every couple seconds or so. ...

The help files warns about this:

From a performance standpoint it is a bad idea to read line by line specifying "line" parameter whose value is incrementing by one. This forces AutoIt to reread the file from the beginning until it reach the specified line.

... a way to just keep the file open then keep reading it through every loop.

Like others have mentioned FileOpen or maybe _FileReadToArray. If the info in the file being read changes, you will have to reread it into the array each time.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×