Jump to content

Recommended Posts

Posted

I had 3, 1, 1, 0 version of AutoIT very long

And now i updated to 3, 2, 12, 1

$oldfile = FileOpenDialog("File", ".", "Text files (*.txt)", 1)
if @Error = 1 then exit
$i=0
while 1
    $i=$i+1
    ToolTip("aaa "&$i)
    $oldline = FileReadLine($oldfile,1789)
wend

in some my scripts i use this FileReadLine function

in 3.1 its work very quick ( i see refresh of ToolTip("aaa "&$i))

i cant read tooltips number $i

but! on new 3.2 its very very slow!!!!

tooltips +1 on $i in ONE second!!!!

all my scripts begin work very slow!!

and with rise line-number for function speed slow and slow and slow

win98 / pentium3 - 500

ansi version of 3.2

Please fix this or say me what i can do!!!

ps

sorry for english :P

Posted

Try this

#Include <File.au3>

$oldfile = FileOpenDialog("File", ".", "Text files (*.txt)", 1)
if @Error = 1 then exit
Local $aFile 
If Not _FileReadToArray($oldfile,$aFile) then 
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf   
    
For $i = 1 to $aFile[0]
    $line = $aFile[$i]
    ConsoleWrite($Line & @crlf)
    ToolTip("Line number " & $i)
Next
Posted

script in first post - for example only - demonstartion of speed

but i am already have some other old my scripts

and its have low speed only in ansi version for 98

very low

Posted

Try this

#Include <File.au3>

$oldfile = FileOpenDialog("File", ".", "Text files (*.txt)", 1)
if @Error = 1 then exit
Local $aFile 
If Not _FileReadToArray($oldfile,$aFile) then 
   MsgBox(4096,"Error", " Error reading log to Array     error:" & @error)
   Exit
EndIf   
    
For $i = 1 to $aFile[0]
    $line = $aFile[$i]
    ConsoleWrite($Line & @crlf)
    ToolTip("Line number " & $i)
Next
thanks for that!

i replace some my code with _FileReadToArray - its work very very faster then my old FileReadLine ( 5 sek VS 2 minutes)! its great!

But the low speed in FileReadLine of Ansi version and normal speed in XP (with same hardwares) need a fix!

Posted

thanks for that!

i replace some my code with _FileReadToArray - its work very very faster then my old FileReadLine ( 5 sek VS 2 minutes)! its great!

But the low speed in FileReadLine of Ansi version and normal speed in XP (with same hardwares) need a fix!

Using FilereadLine as far as I know sucks anyway, because each time you use it it reads from the start up to the line you need.

Using the array should be much faster on any computer OS

Posted

using FilereadLine as far as I know sucks anyway, because each time you use it it reads from the start up to the line you need.

may be, but why one script work with diferent speed on

AutoIt3.exe

AutoIt3A.exe

on same OS (win XP sp2)?

Posted

Maybe your input text needs conversion overheads? Does it use some of the extended ANSI character set?

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
×
×
  • Create New...