Jump to content

FileReadLine Lag Issue


TheTex
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...